code to parse a file

Nathan Clegg nathan at islanddata.com
Thu Feb 10 11:37:46 EST 2000


On 10-Feb-2000 Pedro Silva wrote:
>         for lines in f.readline():

I believe this is your mistake here.  If you use readline(), you will
be looping over the characters of a single line.  I think you want to
use readlines().


----------------------------------
Nathan Clegg
 nathan at islanddata.com






More information about the Python-list mailing list