Idiomatic portable way to strip line endings?

Skip Montanaro skip at pobox.com
Sun Dec 16 13:53:01 EST 2001


    John> Huh? This works fine on Windows. The C library (which is what
    John> Python is based on, after all) is defined to convert the operating
    John> system dependent line end sequence to '\n' on input, and back on
    John> output.

Even if you get the file from an operating system that uses another line
ending convention?

-- 
Skip Montanaro (skip at pobox.com - http://www.mojam.com/)




More information about the Python-list mailing list