Commit d5e00736 authored by Greg Ward's avatar Greg Ward

Added 'translate_longopt()' function.

parent e0a10947
......@@ -472,6 +472,13 @@ def wrap_text (text, width):
# wrap_text ()
def translate_longopt (opt):
"""Convert a long option name to a valid Python identifier by
changing "-" to "_".
"""
return string.translate(opt, longopt_xlate)
class OptionDummy:
"""Dummy class just used as a place to hold command-line option
values as instance attributes."""
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment