summaryrefslogtreecommitdiffstats
path: root/Lib/distutils/fancy_getopt.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/distutils/fancy_getopt.py')
-rw-r--r--Lib/distutils/fancy_getopt.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/Lib/distutils/fancy_getopt.py b/Lib/distutils/fancy_getopt.py
index eaf6073..f935200 100644
--- a/Lib/distutils/fancy_getopt.py
+++ b/Lib/distutils/fancy_getopt.py
@@ -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: