Wrapping stdout in a codec
JKPeck
JKPeck at gmail.com
Sun Oct 21 22:41:17 EDT 2007
We want to wrap the stdout device in a codec in order to decode output
transparently according to a particular code page (which might not be
the system code page). However, codec.open requires a filename, and
stdout may be a tty or otherwise anonymous. How can we accomplish
this wrapping? Our application may be loaded into a Python program
that has already set up stdout.
TIA,
Jon Peck
More information about the Python-list
mailing list