This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author blueyed
Recipients blueyed
Date 2019-08-09.14:52:52
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1565362372.8.0.519393722004.issue37803@roundup.psfhosted.org>
In-reply-to
Content
The long options passed to `getopt.getopt` should not include the leading dashes:


    % python -m pdb --help
    Traceback (most recent call last):
      File "/usr/lib/python3.7/runpy.py", line 193, in _run_module_as_main
        "__main__", mod_spec)
      File "/usr/lib/python3.7/runpy.py", line 85, in _run_code
        exec(code, run_globals)
      File "/home/daniel/src/pdbpp/pdb.py", line 1672, in <module>
        pdb.main()
      File "/usr/lib/python3.7/pdb.py", line 1662, in main
        opts, args = getopt.getopt(sys.argv[1:], 'mhc:', ['--help', '--command='])
      File "/usr/lib/python3.7/getopt.py", line 93, in getopt
        opts, args = do_longs(opts, args[0][2:], longopts, args[1:])
      File "/usr/lib/python3.7/getopt.py", line 157, in do_longs
        has_arg, opt = long_has_args(opt, longopts)
      File "/usr/lib/python3.7/getopt.py", line 174, in long_has_args
        raise GetoptError(_('option --%s not recognized') % opt, opt)
    getopt.GetoptError: option --help not recognized

(it works in Python 2.7)
History
Date User Action Args
2019-08-09 14:52:52blueyedsetrecipients: + blueyed
2019-08-09 14:52:52blueyedsetmessageid: <1565362372.8.0.519393722004.issue37803@roundup.psfhosted.org>
2019-08-09 14:52:52blueyedlinkissue37803 messages
2019-08-09 14:52:52blueyedcreate