Writing binary to stdout

Paul Watson pwatson at redlinepy.com
Tue Jun 22 21:46:59 CEST 2004


How can I write lines to stdout on a Windows machine without having '\n'
expanded to '\r\n'.

I need to do this on Python 2.1 and 2.3+.

I see the msvcrt.setmode function.  Is this my only path?  Is it valid to
change the mode of stdout?  The file.newlines is not writable.





More information about the Python-list mailing list