strange problem

Tim Chase python.list at tim.thechases.com
Tue Oct 24 17:50:17 EDT 2006


> This file has 1,000,000+ lines in it, yet when I print the counter 'cin' 
> at EOF I get around 10,000 less lines. Any ideas?
> 
>     lineIn = 
> csv.reader(file("rits_feed\\rits_feed_US.csv",'rb'),delimiter='|')
>      for emp in lineIn:
>          cin=cin+1
>      print cin

What happens if you open it in ascii mode rather than binary mode?

-tkc







More information about the Python-list mailing list