File not read to end

bruce peng promagian at gmail.com
Thu Apr 26 21:26:06 EDT 2007


"rb",,please






































<andrew.jefferies at gmail.com> wrote in message 
news:1177522730.327454.121120 at s33g2000prh.googlegroups.com...
> Hi,
>
> I'm trying to write a simple log parsing program. I noticed that it
> isn't reading my log file to the end.
>
> My log is around 200,000 lines but it is stopping at line 26,428. I
> checked that line and there aren't any special characters.
>
> This is the file reading code segment that I'm using:
>    sysFile=open(sysFilename,'r')
>    lineCount = 0
>    for line in sysFile:
>        lineCount +=1
>        print str(lineCount) + " -- " + line
>
> I also stuck this same code bit into a test script and it was able to
> parse the entire log without problem. Very quirky.
>
> This is my first foray from Perl to Python so I appreciate any help.
>
> Thanks in advance.
>
> --Andrew
> 





More information about the Python-list mailing list