Why can't I set sys.ps1 to a unicode string?

Martin v. Loewis martin at v.loewis.de
Thu Aug 12 03:26:15 EDT 2010


> So... why does having a non-ascii character in sys.ps1 make the prompt 
> vanish?

I can't pinpoint it to a specific line of code. Most likely, it tries
to encode the prompt as ASCII before writing it to stdout. That fails,
and it silently ignores the error.

FWIW, this is fixed in Python 3.

Regards,
Martin



More information about the Python-list mailing list