python 2.4: tarfile tell() and seek() seem to be broeken

Lars Gustäbel lars at gustaebel.de
Thu Jun 2 17:57:20 CEST 2005


On Wed, 01 Jun 2005 14:58:23 +0200, N. Volbers wrote:

> - subsequent calls of fd.readline() and fd.tell() will yield the correct
> lines but always the same value from fd.tell().  
> 
> Is there a mistake on my side or does this need fixing?

This is a bug. Although the pseudo file object's readline() method returns
the file data line-wise, the data is processed block-wise (100 chars)
internally. Therefore, the output of tell() will always return the
position right after the current block if it is used in conjunction with
readline().

Thank you for pointing that out. I'll take care of this getting fixed.

-- 
Lars Gustäbel
lars at gustaebel.de




More information about the Python-list mailing list