Reading a file
Calvelo Daniel
dcalvelo at pharion.univ-lille2.fr
Tue Jul 25 15:36:25 EDT 2000
Tim Northover <tim at pnorthover.freeserve.co.uk> wrote:
: I'm attempting to read a file line by line with readline(), but it
: seems to return and empty string when EOF is encountered. Is there a
: way of discerning the difference between the end of the file and a
: blank line in the file?
An empty line is never empty: it has \n or \r or both.
: I'm very new to this so I don't know the methods used but I couldn't
: find anything relevant when grepping the html docs.
http://www.python.org/doc/FAQ.html
Entry 6.30
HTH -- DCA
-- Daniel Calvelo Aros
calvelo at lifl.fr
More information about the Python-list
mailing list