read a file line by line using readline()

Thomas Girod girodt at gmail.com
Wed Mar 22 13:34:50 EST 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