On Wed, 12 Sep 2007 17:28:08 -0500, "Shankarjee Krishnamoorthi"
<shankarjee@gmail.com> declaimed the following in comp.lang.python:
> I would prefer to use something with seek. I am not able to use seek()
> with "for line in inp". Use tell and seek does not seem to do anything
> with the code. When I try to do
>
> for line in inp.readlines():
.readlines() does just what is says -- it reads ALL lines at once.
Once it has done this, .tell() will return the EOF.
for line in inp:
will read one line at a time (I'm fairly sure the iterator doesn't
attempt to buffer multiple lines behind the scenes)
--
Wulfraed Dennis Lee Bieber KD6MOG
wlfraed@ix.netcom.com wulfraed@bestiaria.com
HTTP://wlfraed.home.netcom.com/
(Bestiaria Support Staff: web-asst@bestiaria.com)
HTTP://www.bestiaria.com/