newbieish question

Mike Carifio carifio.nospam at nospam.usys.com
Tue Feb 19 17:09:12 EST 2002


Is there a way to turn off the interpretation of "\n" on sys.platform ==
"win32"
when writing to a file?

Here's an example:

fh = open("a_file.text", "w") # say
fw.write("\n")  # writes \r\n on win32
fw.write(chr(10))  # also appears to write \r\n on win32; can I get just
line feed?







More information about the Python-list mailing list