TarFile using binary strings

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Marc Poinot (Onera)

    TarFile using binary strings


    Hi all,

    I have a DBMS with Blobs, I want to export them into a tar.gz file using
    the TarFile module.
    So far, I'm using a temporary file for the tar file creation, each blob
    is exported into a
    file and then added to the tar file.

    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 ?

    marcvs [alias Hmmm... but you have 2Gb memory and 800Gb disk, so ?]




Working...