Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(20)  |  Call(14)  |  Derive(0)  |  Import(6)
Unpack the tar or zip file at the specified `archive_filename` to the
directory specified by `output_dirname`.

        def extract(archive_filename, output_dirname='./', verbose=True):
    """
    Unpack the tar or zip file at the specified `archive_filename` to the
    directory specified by `output_dirname`.
    """
    Archive(archive_filename).extract(output_dirname)
        


src/g/p/gp.recipe.node-0.10.26.0/gp/recipe/node/__init__.py   gp.recipe.node(Download)
 
                from zc.buildout.download import Download
                from archive import extract
 
                # Use the buildout download infrastructure
                # gzipped tarballs.  This prevents an error when downloaded
                # into a temporary file.
                extract(filename, destination, ext=".tar.gz")
 
            else:

src/g/p/gp.recipe.node-HEAD/gp/recipe/node/__init__.py   gp.recipe.node(Download)
 
                from zc.buildout.download import Download
                from archive import extract
 
                # Use the buildout download infrastructure
                # gzipped tarballs.  This prevents an error when downloaded
                # into a temporary file.
                extract(filename, destination, ext=".tar.gz")
 
            else:

src/s/k/skdata-0.0.4/skdata/utils/download_and_extract.py   skdata(Download)
            print " SHA-1 verification..."
        verify_sha1(archive_filename, sha1)
    archive.extract(archive_filename, output_dirname, verbose=verbose)
 
 

src/s/k/skdata-HEAD/skdata/utils/download_and_extract.py   skdata(Download)
            print " SHA-1 verification..."
        verify_sha1(archive_filename, sha1)
    archive.extract(archive_filename, output_dirname, verbose=verbose)
 
 

src/v/i/viset-0.3.2/viset/download.py   viset(Download)
            print " SHA-1 verification..."
        verify_sha1(archive_filename, sha1)
    archive.extract(archive_filename, output_dirname, verbose=verbose)
 
 

src/i/n/infi.recipe.application_packager-0.4.7/src/infi/recipe/application_packager/utils/compiler/__init__.py   infi.recipe.application_packager(Download)
    def extract_archive(self, archive_path):
        from archive import extract
        from .. import temporary_directory_context, chdir
        with temporary_directory_context() as tempdir:
            extract(archive_path, tempdir)

src/i/n/infi.recipe.application_packager-0.4.7/src/infi/recipe/application_packager/msi/__init__.py   infi.recipe.application_packager(Download)
    def wix_context(self):
        from archive import extract
        with utils.temporary_directory_context() as tempdir:
            wix_archive = self.get_wix35_binaries_zip_from_the_internet()
            extract(wix_archive)

src/p/y/python-archive-0.2/archive/test/test_archive.py   python-archive(Download)
 
from archive.compat import IS_PY2
from archive import Archive, extract, UnsafeArchive, UnrecognizedArchiveFormat
 
 
    def test_extract_function(self):
        extract(self.archive_path, self.tmpdir, ext=self.ext)
        self.check_files(self.tmpdir)
 
    def test_extract_function_fileobject(self):
        f = open(self.archive_path, 'rb')
        extract(f, self.tmpdir, ext=self.ext)
    def test_extract_function_no_to_path(self):
        os.chdir(self.tmpdir)
        extract(self.archive_path, ext=self.ext)
        self.check_files(self.tmpdir)
 

src/a/r/Archive-0.3/archive/test/__init__.py   Archive(Download)
import unittest
 
from archive import Archive, extract, UnsafeArchive, UnrecognizedArchiveFormat
 
 
    def test_extract_function(self):
        extract(self.archive_path, self.tmpdir)
        self.check_files(self.tmpdir)
 
    def test_extract_function_fileobject(self):
        f = open(self.archive_path)
        extract(f, self.tmpdir)
    def test_extract_function_no_to_path(self):
        os.chdir(self.tmpdir)
        extract(self.archive_path)
        self.check_files(self.tmpdir)
 
    def test_extract_function_filename(self):
        extract(self.archive_path, self.tmpdir, filename=self.filename)
        self.check_files(self.tmpdir)