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 cmcqueen1975
Recipients cmcqueen1975, ezio.melotti
Date 2010-07-05.07:12:33
SpamBayes Score 2.4925978e-06
Marked as misclassified No
Message-id <1278313955.51.0.485701291822.issue9161@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2010-07-05 07:12:35cmcqueen1975setrecipients: + cmcqueen1975, ezio.melotti
2010-07-05 07:12:35cmcqueen1975setmessageid: <1278313955.51.0.485701291822.issue9161@psf.upfronthosting.co.za>
2010-07-05 07:12:34cmcqueen1975linkissue9161 messages
2010-07-05 07:12:33cmcqueen1975create