BUG? Re: stripping cr/lf, lf, cr
deadmeat
root at [127.0.0.1]
Wed Apr 4 03:20:01 EDT 2001
> One advantage to this is that if you do work with text files, leaving
> the open in text mode means that you can portably use "\n" within your
> code as a line ending for both reading and writing.
Except people (like Steve, whose example I was replying) will strip
os.linesep, not realising that the same code on Windows won't
work unless the file was opened binary (which is hardly intuitive since it's
a text file to begin with).
More information about the Python-list
mailing list