Python 3: why tell() function after first readline() raises MemoryError? -


i have strange issue python 3.2.5 on cygwin. wonder if cygwin-specific bug, cannot check now. after read 1 line text file, next tell() raises memoryerror. can tell if normal behavior , why?

>>> f = open("file.txt","r") >>> f.tell() 0 >>> f.readline() '#!/bin/bash\n' >>> f.tell() traceback (most recent call last):   file "<stdin>", line 1, in <module> memoryerror >>> 

on other hand, after seek() ok:

>>> f = open("file.txt","r") >>> >>> f.seek(10) 10 >>> f.tell() 10 >>> 


Comments

Popular posts from this blog

shopping cart - Page redirect not working PHP -

php - How to modify a menu to show sub-menus -

python - Installing PyDev in eclipse is failed -