file.encoding doesn't apply to file.write?

"Martin v. Löwis" martin at v.loewis.de
Mon Jun 7 01:55:00 EDT 2004


Matthew Mueller wrote:
> I noticed in python2.3 printing unicode to an appropriate terminal
> actually works.  But using sys.stdout.write doesn't.

Please report that as a bug. As a work-around, explicitly encode
with sys.stdout.encoding (or make a codecs.StreamReaderWriter,
passing codecs.lookup(sys.stdout.encoding)).

Regards,
Martin




More information about the Python-list mailing list