On Wed, Aug 31, 2011 at 12:37 PM, Alex van der Spek <zd...@xs4all.nl> wrote: > I have a text file that uses both '\r' and '\r\n' end-of-line terminations. > > The '\r' terminates the first 25 lines or so, the remainder is termiated > with '\r\n' <snip> > Is there a way to make it read one line at a time, regardless of the line > termination?
Universal Newline Support http://www.python.org/dev/peps/pep-0278/ http://docs.python.org/library/functions.html#open (Modes involving "U") Cheers, Chris -- http://mail.python.org/mailman/listinfo/python-list