14mb file shouldn't be an issue, unless you very little ram, is there any errors being outputted?<br><br>a cleaner way for reading the file:<br><br>for line in open("output.new"):<br> if line.startswith("intrinsic"):<br>
print line<br><br><br><div class="gmail_quote">On Mon, Jun 22, 2009 at 2:16 PM, Bryan Fodness <span dir="ltr"><<a href="mailto:bryan.fodness@gmail.com">bryan.fodness@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
I am trying to output all the lines that start with a specific word.<br>
It is a large output file (~14 Mb), but nothing that I thought would<br>
be a problem.<br>
<br>
for line in open('output.new'):<br>
i_line = line.split()<br>
if i_line:<br>
if i_line[0] == "intrinsic":<br>
print i_line<br>
<br>
It does not get all of the lines, it stops at line 130323. There are<br>
~260000 line. Is there a limit to the number of lines you can read in<br>
this way, or am I overlooking something else.<br>
<br>
Bryan<br>
_______________________________________________<br>
Tutor maillist - <a href="mailto:Tutor@python.org">Tutor@python.org</a><br>
<a href="http://mail.python.org/mailman/listinfo/tutor" target="_blank">http://mail.python.org/mailman/listinfo/tutor</a><br>
</blockquote></div><br>