On Mon, Oct 12, 2009 at 11:32 PM, Luis Zarrabeitia <ky...@uh.cu> wrote:

> Actually, in python, this works even better:
>
> for lin in iter(file_object.readline, ""):
>    ... do something with lin
>
>
What about ....

>>> with open(path_string) as f:
>>>     for line in f:
>>>         # do something

Cheers,
Xav
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to