opening sys.stdout in binary mode on Windows?

gbreed at gbreed at
Thu Oct 18 11:23:35 CEST 2001

In article <mailman.1003365858.22834.python-list at>, 
janssen at (Bill Janssen) wrote:

> On Windows, I'd like to have stdout opened in binary mode before
> writing to it.  I've tried things like
>    sys.stdout = os.fdopen(sys.stdout.fileno(), "wb")
> without success.  Anyone know the trick?

Run as python -u


More information about the Python-list mailing list