BUG? Re: stripping cr/lf, lf, cr

deadmeat root at [127.0.0.1]
Tue Apr 3 14:13:19 EDT 2001


>  >>> os.linesep
>  '\012'

os.linesep is \015\012 on Windows.

I seem to have found the real problem: readline()/readlines() returns the
string(s) with only \012 on it, not both or none. I guess it's because
DOS/Win use two bytes not one like Unix/Mac for EOL, making EOL a tad harder
since it requires peeking ahead a byte to see if it's \012 or not.






More information about the Python-list mailing list