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

N. Volbers mithrandir42 at
Wed Jun 1 14:58:23 CEST 2005

Hello everyone,

I noticed that when you open a zipped tarball using 'tarfile' and if you
then get the pseudo-file descriptor fd for a file via 'extractfile', then
fd.tell() is broken in the following way:

- before reading anything from fd, fd.tell() will return 0 (that's still
- after reading a line via fd.readline(), fd.tell() will return a
value different from 0 (still ok, I guess)
- subsequent calls of fd.readline() and fd.tell() will yield the correct
lines but always the same value from fd.tell(). seems to be unaffected from this strange behaviour.

Is there a mistake on my side or does this need fixing?

Best regards,

Niklas Volbers.

More information about the Python-list mailing list