Softpedia
 


LINUX CATEGORIES:



GLOBAL PAGES >>
NEWS ARCHIVE >>
SOFTPEDIA REVIEWS >>
MEET THE EDITORS >>
WEEK'S BEST
  • Linux Kernel 3.9.3 / 3....
  • LibreOffice 3.6.6 / 4.0.3
  • MPlayer 1.1.1
  • systemd 204
  • Arch Linux 2013.05.01
  • Blender 2.67
  • KDE Software Compilatio...
  • CrunchBang Linux Stable...
  • Elementary OS 0.1 / 0.2...
  • SystemRescueCd 3.6.0
  • Home > Linux > Programming > Libraries

    Archive 0.3

    Download button

    No screenshots available
    Downloads: 125  Tell us about an update
    User Rating:
    Rated by:
    NOT RATED
    0 user(s)
    Developer:

    License / Price:

    Last Updated:

    Category:
    Gary Wilson Jr. | More programs
    Other/Proprietary Li... / FREE
    February 6th, 2012, 17:41 GMT
    ROOT / Programming / Libraries

     Read user reviews (0)  Refer to a friend  Subscribe

    Archive description

    Simple library that provides a common interface for extracting zip and tar archives

    Archive provides a simple, pure-Python interface for handling various archive file formats. Currently, archive extraction is the only supported action. Supported file formats include:

    - Zip formats and equivalents: .zip, .egg, .jar.
    - Tar and compressed tar formats: .tar, .tar.gz, .tgz, .tar.bz2, .tz2.

    Example usage

    Using the Archive class:

    from archive import Archive
    a = Archive('files.tar.gz')
    a.extract()


    Using the extract convenience function:

    from archive import extract
    # Extract in current directory.
    extract('files.tar.gz')
    # Extract in directory 'unpack_dir'.
    extract('files.tar.gz', 'unpack_dir')


    Note that calling extract with safe=True will ensure that the archive is safe prior to extraction: UnsafeArchive exception will be raised when archive contains paths which would be extracted outside of the target directory (e.g. absolute paths):

    # Safely extract in directory 'unpack_dir'.
    extract('files.tar.gz', 'unpack_dir', safe=True)



    Product's homepage

    Requirements:

    · Python

      


    TAGS:

    zip extractor | tar extractor | archive extractor | zip | tar | archive

    Go to top

    WindowsGamesDriversMacLinuxScriptsMobileHandheldNews

    SUBMIT PROGRAM   |   ADVERTISE   |   GET HELP   |   SEND US FEEDBACK   |   RSS FEEDS   |   UPDATE YOUR SOFTWARE   |   ROMANIAN FORUM