BIG problem if readline strips newlines
scarblac at pino.selwerd.nl
Wed Jun 13 04:00:58 EDT 2001
William Dandreta <wjdandreta at worldnet.att.net> wrote in comp.lang.python:
> Hi Pete,
> >i've seen frequent mention of an option for readline()
> >to strip out newlines as each string is read. this sounds
> >like a great idea, but i realized its gonna be very
> >difficult to loop through a text file. the standard
> >python idioms will no longer work...
> I don't think it means it changes the file, just the string(s) that are
> returned by readline(s)(). Blank lines will be empty strings.
And so is the end of file, as returned by readline(). How to see the
More information about the Python-list