[issue7610] Cannot use both read and readline method in same ZipExtFile object

lucifer report at bugs.python.org
Thu Dec 31 09:11:23 CET 2009


New submission from lucifer <luyuntao at yahoo.com.cn>:

open a file in the zip file through ZipFile.open method, if invoke read 
method after readline method in the ZipExtFile object, the data is not 
correct.

I was trying to get a ZipExtFile and pass it to pickle.load(f), a 
exception was thrown.

The reason is readline will keep a linebuffer, but read only use 
readbuffer. After invoke readline, there will be some missing data in 
linebuffer when invoke read method

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue7610>
_______________________________________


More information about the Python-bugs-list mailing list