opening sys.stdout in binary mode on Windows?

Bill Janssen janssen at parc.xerox.com
Wed Oct 17 20:43:13 EDT 2001


Hi.

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?

Bill





More information about the Python-list mailing list