On Mon, Oct 12, 2009 at 11:32 PM, Luis Zarrabeitia <span dir="ltr"><<a href="mailto:kyrie@uh.cu">kyrie@uh.cu</a>></span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">

Actually, in python, this works even better:<br>
<br>
for lin in iter(file_object.readline, ""):<br>
    ... do something with lin<br>
<br></blockquote><div><br>What about ....<br><br><span style="font-family: courier new,monospace;">>>> with open(path_string) as f:</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">>>>        for line in f:</span><br>

>>><span style="font-family: courier new,monospace;">         # do something</span><br style="font-family: courier new,monospace;"><br>Cheers,<br>Xav<br><br></div></div>