[IPython-User] 0.11: sys.argv is now unicode
Wed Aug 10 15:25:38 CDT 2011
On Wed, Aug 10, 2011 at 07:39, John Reid <email@example.com>wrote:
> I've switched to 0.11 recently and am very happy with it. One thing I
> did notice is that all of sys.argv is now unicode. Is there any way to
> get back to the old behaviour where sys.argv was string?
We have found things to be better behaved when argv is decoded. You can, of
course, encode it right back to bytes with:
sys.argv = [ a.encode(sys.stdin.encoding or 'ascii') for a in sys.argv ]
> IPython-User mailing list
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the IPython-User