pipeline encoding

Tomasz Toczyski tt at praterm.com.pl
Fri Dec 7 17:01:29 EST 2007


"Martin v. Löwis":
> Not a command line option. However, you can wrap sys.stdout with a
> stream that automatically performs an encoding. If all your print
> statements output Unicode strings, you can do
>
> sys.stdout = codecs.getwriter("utf-8")(sys.stdout)

It is the best solution for me.
Thanks.

-tt.



More information about the Python-list mailing list