[issue18936] 2.7 distutils getopt chokes on unicode option names

Jason R. Coombs report at bugs.python.org
Sun Sep 8 19:54:07 CEST 2013


Jason R. Coombs added the comment:

oh. My mistake. I didn't realize the error was in 'distutils.fancy_getopt' and not in the getopt module itself. Indeed, the problem doesn't exist under getopt itself, so is specific to distutils and fancy_getopt.

>>> from __future__ import unicode_literals
>>> import getopt
>>> getopt.getopt('-x', 'x', ('--longx',))
([], u'-x')
>>>

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue18936>
_______________________________________


More information about the Python-bugs-list mailing list