Readline and record separator

Jeff jeffober at gmail.com
Tue Oct 30 08:44:47 EDT 2007


If it's a short file you could slurp the entire file and then split it
however you like using regular expressions.

I'm not sure if you can alter it, but os.linesp holds the value that
is accessed when file.readlines() splits lines.  Conceivably, if it
were set to 'FOO', 'FOO' would be used to determine the EOL string.




More information about the Python-list mailing list