Craig McQueen <pyt...@craig.mcqueen.id.au> added the comment:

To further explain, I had code e.g.:

    parser.add_option(u'-s', u'--seqfile', dest='seq_file_name', help=u'Write 
sequence file output to FILE', metavar=u'FILE')

I had to remove the unicode designator for the first parameter:
    parser.add_option('-s', u'--seqfile', dest='seq_file_name', help=u'Write 
sequence file output to FILE', metavar=u'FILE')

On further investigation, it looks as though the optparse module has other 
problems with Unicode: e.g. if I try to set a non-ASCII parameter on the 
command line e.g.:
    myprog.py -本
Then optparse can't handle that--it gets an encoding error on line 1396.

What _does_ work is that an option's parameters can be Unicode:
    myprog.py -s 本.txt

So I guess there are broader problems than the specific 2.6 to 2.7 change that 
I originally reported.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue9161>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to