TarFile using binary strings

Juha Autero Juha.Autero at iki.fi
Tue Aug 12 22:53:30 CEST 2003

"Marc Poinot (Onera)" <marc.poinot at dlr.de> writes:

> Is it possible to avoid the temporary files, and read the stream
> from the binary string coming from DBMS ? The TarInfo object uses a
> fileobj Python type, is there any trick (or module) to make TarInfo
> happy with a 'possible' fileobj-like on a memory zone ?

Well, StringIO provides file-like interface to strings you should be
able to use. Just create TarInfo object, fill up the fields
(especially the size) and then pass it and StringIO object to

Juha Autero
Eschew obscurity!

More information about the Python-list mailing list