MRAB wrote:
> On 2016-03-04 13:04, Veek. M wrote:
>> Terry Reedy wrote:
>>
>>> On 2/27/2016 4:39 AM, Veek. M wrote:
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
On 2016-03-04 13:04, Veek. M wrote:
Terry Reedy wrote:
On 2/27/2016 4:39 AM, Veek. M wrote:
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
Terry Reedy wrote:
> On 2/27/2016 4:39 AM, Veek. M wrote:
>> 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
On 2/27/2016 4:39 AM, Veek. M wrote:
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.
Not
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