[Tutor] extracting lines in large file
Bryan Fodness
bryan.fodness at gmail.com
Mon Jun 22 22:16:38 CEST 2009
I am trying to output all the lines that start with a specific word.
It is a large output file (~14 Mb), but nothing that I thought would
be a problem.
for line in open('output.new'):
i_line = line.split()
if i_line:
if i_line[0] == "intrinsic":
print i_line
It does not get all of the lines, it stops at line 130323. There are
~260000 line. Is there a limit to the number of lines you can read in
this way, or am I overlooking something else.
Bryan
More information about the Tutor
mailing list