Python package to read .7z archives?

Discussion in 'Python' started by Hallvard B Furuseth, Aug 4, 2010.

  1. Is there an equivalent of zipfile.py for .7z archives?
    I have one which extracts an archive member by running 7z e -so,
    but that's a *slow* way to read one file at a time.

    Google found me some python interfaces to lzma, but apparently they
    only handle single compressed files, not .7z archives.

    (Actually another archive format would be fine if it is competitive.
    I'm just looking to compress my .zips better. I need a Python module
    to extract members reasonably fast, but slow compression would be OK.)

    --
    Hallvard
    Hallvard B Furuseth, Aug 4, 2010
    #1
    1. Advertising

  2. 2010/8/4 Hallvard B Furuseth <>:
    > Is there an equivalent of zipfile.py for .7z archives?
    > I have one which extracts an archive member by running 7z e -so,
    > but that's a *slow* way to read one file at a time.
    >
    > Google found me some python interfaces to lzma, but apparently they
    > only handle single compressed files, not .7z archives.
    >
    > (Actually another archive format would be fine if it is competitive.
    > I'm just looking to compress my .zips better.  I need a Python module
    > to extract members reasonably fast, but slow compression would be OK.)
    >
    > --
    > Hallvard
    > --
    > http://mail.python.org/mailman/listinfo/python-list
    >


    http://bugs.python.org/issue5689


    --- Giampaolo
    http://code.google.com/p/pyftpdlib/
    http://code.google.com/p/psutil/
    Giampaolo Rodolà, Aug 4, 2010
    #2
    1. Advertising

  3. Giampaolo Rodolà <> writes:
    > 2010/8/4 Hallvard B Furuseth <>:
    >> Is there an equivalent of zipfile.py for .7z archives?
    >> I have one which extracts an archive member by running 7z e -so,
    >> but that's a *slow* way to read one file at a time.
    >>
    >> Google found me some python interfaces to lzma, but apparently they
    >> only handle single compressed files, not .7z archives.
    >>
    >> (Actually another archive format would be fine if it is competitive.
    >> I'm just looking to compress my .zips better.  I need a Python module
    >> to extract members reasonably fast, but slow compression would be OK.)

    >
    > http://bugs.python.org/issue5689


    [For lzma/xz compressed tar archives]

    Thanks, but extraction of individual members from .tar.xz looks
    inherently slow. To locate the member, you need to decompress
    the entire portion of the archive preceding the member.

    --
    Hallvard
    Hallvard B Furuseth, Aug 4, 2010
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Bobert

    Daily python url archives

    Bobert, May 19, 2006, in forum: Python
    Replies:
    2
    Views:
    304
    gene tani
    May 19, 2006
  2. samwyse
    Replies:
    3
    Views:
    230
    Chuck Rhode
    Jun 5, 2007
  3. David W.
    Replies:
    0
    Views:
    272
    David W.
    Oct 11, 2009
  4. Replies:
    0
    Views:
    244
  5. David Karr
    Replies:
    2
    Views:
    499
    J. Gleixner
    Jun 1, 2012
Loading...

Share This Page