unpack archive files
- Links:
- home: https://github.com/ponty/pyunpack
- documentation: http://ponty.github.com/pyunpack
- Features:
- unpack archive files without password
- very simple interface
- command line interface and library
- supported python versions: 2.6, 2.7
- tested only on linux
- back-ends:
- zipfile: included in Python
- patool: It relies on helper applications to handle those archive formats (for example bzip2 for BZIP2 archives). Supported formats: 7z (.7z), ACE (.ace), ALZIP (.alz), AR (.a), ARC (.arc), ARJ (.arj), BZIP2 (.bz2), CAB (.cab), compress (.Z), CPIO (.cpio), DEB (.deb), DMS (.dms), GZIP (.gz), LRZIP (.lrz), LZH (.lha, .lzh), LZIP (.lz), LZMA (.lzma), LZOP (.lzo), RPM (.rpm), RAR (.rar), RZIP (.rz), TAR (.tar), XZ (.xz), ZIP (.zip, .jar) and ZOO (.zoo)
patool is called by pyunpack using its command line interface. If Patool is not installed then only zip format can be unpacked using the internal python zipfile library.
>>> from pyunpack import Archive >>> Archive('a.zip').extractall('/path/to')
or on console:
python -m pyunpack.cli a.zip /path/to
- zipfile: zip only, included in python
- patool: many formats, command line only
- python-archive: zip and tar only
- rarfile: rar only
- pyUnRAR2: rar only
- pylzma: LZMA only
- easy-extract: many formats, no simple interface for unpacking
- python-archive: zip and tar only
- pyarchive
- nested.tar.archives.extractor: tar only
sudo apt-get install python-pip sudo pip install pyunpack #optional sudo pip install http://downloads.sourceforge.net/project/patool/0.17/patool-0.17.tar.gz sudo pip install entrypoint2 # for cli.py sudo apt-get install unzip unrar p7zip-full
# as root pip uninstall pyunpack