I want to do something like:
#!/usr/bin/env python3
fh = open('/etc/motd')
for line in fh.readlines():
print(fh.tell())
why doesn't this work as expected.. fh.readlines() should return a
generator object and fh.tell() ought to start at 0 first.
Instead i get the final count repeated for the number of lines.
What i'm trying to do is lookahead:
#!whatever
fh = open(whatever)
for line in fh.readlines():
x = fh.tell()
temp = fh.readline()
fh.seek(x)
--
https://mail.python.org/mailman/listinfo/python-list