Added 'translate_longopt()' function.

This commit is contained in:
Greg Ward 2000-09-25 01:58:31 +00:00
parent 2f2b6c62ba
commit 68ded6e6f1
1 changed files with 7 additions and 0 deletions

View File

@ -470,6 +470,13 @@ def wrap_text (text, width):
return lines
# 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: