read a file line by line using readline()

Thomas Girod girodt at
Wed Mar 22 19:34:50 CET 2006

If your code is exactly what you've copy-pasted, then you are not
testing against an empty string but a "one blank space" string ...

I've just tried with :

while line != "":

and it works very well.

More information about the Python-list mailing list