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

All Samples(15)  |  Call(9)  |  Derive(0)  |  Import(6)

        def create_handler(filename):
    # figure out the type of the file
    if zipfile.is_zipfile(filename):
        logger.debug("File is a zipfile")
        return ZipfileHandler(filename)
    elif tarfile.is_tarfile(filename):
        logger.debug("File is a tarfile")
        return TarfileHandler(filename)
    else:
        raise FileFormatError("Unable to read file %s -- neither a zip file or a tar file" % filename)
        


src/d/a/datablox-HEAD/engage/engage-dist/python_pkg/engage/drivers/genforma/engage_django_sdk/packager/generate_settings.py   datablox(Download)
from utils import app_module_name_to_dir, create_virtualenv, \
                  install_requirements, write_platform_requirements_file
from archive_handlers import create_handler, validate_archive_files
from find_module import find_python_module
from errors import FileMissingError
        shutil.copytree(archive_file_or_directory, app_dir_path)
    else: # we have an archive
        with create_handler(archive_file_or_directory) as h:
            common_dir = validate_archive_files(h.get_namelist())
            h.extract(install_path)

src/d/a/datablox-HEAD/engage/engage-dist/python_pkg/engage/drivers/genforma/engage_django_sdk/packager/__init__.py   datablox(Download)
 
from errors import *
from archive_handlers import ZipfileHandler, TarfileHandler, create_handler, \
                             validate_archive_files
from django_config import django_config_from_validation_results, django_config_from_json
def run_safe_validations_on_archive(archive_file):
    """Wrapper on run_safe_validations that opens the archive,
    does the validations, and then closes it.
    """
    with create_handler(archive_file) as handler:
    def run(self):
        with create_handler(self.archive_file) as handler:
            (common_dir, django_config) = run_safe_validations(handler)
        if self.options.test_install_dir:
            install_dir = os.path.abspath(os.path.expanduser(self.options.test_install_dir))

src/e/n/engage-HEAD/python_pkg/engage/drivers/genforma/engage_django_sdk/packager/generate_settings.py   engage(Download)
from utils import app_module_name_to_dir, create_virtualenv, \
                  install_requirements, write_platform_requirements_file
from archive_handlers import create_handler, validate_archive_files
from find_module import find_python_module
from errors import FileMissingError
        shutil.copytree(archive_file_or_directory, app_dir_path)
    else: # we have an archive
        with create_handler(archive_file_or_directory) as h:
            common_dir = validate_archive_files(h.get_namelist())
            h.extract(install_path)

src/e/n/engage-HEAD/python_pkg/engage/drivers/genforma/engage_django_sdk/packager/__init__.py   engage(Download)
 
from errors import *
from archive_handlers import ZipfileHandler, TarfileHandler, create_handler, \
                             validate_archive_files
from django_config import django_config_from_validation_results, django_config_from_json
def run_safe_validations_on_archive(archive_file):
    """Wrapper on run_safe_validations that opens the archive,
    does the validations, and then closes it.
    """
    with create_handler(archive_file) as handler:
    def run(self):
        with create_handler(self.archive_file) as handler:
            (common_dir, django_config) = run_safe_validations(handler)
        if self.options.test_install_dir:
            install_dir = os.path.abspath(os.path.expanduser(self.options.test_install_dir))

src/e/n/engage-django-sdk-1.0.0/engage_django_sdk/packager/generate_settings.py   engage-django-sdk(Download)
from utils import app_module_name_to_dir, create_virtualenv, \
                  install_requirements, write_platform_requirements_file
from archive_handlers import create_handler, validate_archive_files
from find_module import find_python_module
from errors import FileMissingError
        shutil.copytree(archive_file_or_directory, app_dir_path)
    else: # we have an archive
        with create_handler(archive_file_or_directory) as h:
            common_dir = validate_archive_files(h.get_namelist())
            h.extract(install_path)

src/e/n/engage-django-sdk-1.0.0/engage_django_sdk/packager/__init__.py   engage-django-sdk(Download)
 
from errors import *
from archive_handlers import ZipfileHandler, TarfileHandler, create_handler, \
                             validate_archive_files
from django_config import django_config_from_validation_results, django_config_from_json
def run_safe_validations_on_archive(archive_file):
    """Wrapper on run_safe_validations that opens the archive,
    does the validations, and then closes it.
    """
    with create_handler(archive_file) as handler:
    def run(self):
        with create_handler(self.archive_file) as handler:
            (common_dir, django_config) = run_safe_validations(handler)
        if self.options.test_install_dir:
            install_dir = os.path.abspath(os.path.expanduser(self.options.test_install_dir))