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

All Samples(3)  |  Call(2)  |  Derive(0)  |  Import(1)

            def is_string(obj):
        return isinstance(obj, basestring)
        


src/p/y/python-archive-0.2/archive/__init__.py   python-archive(Download)
import zipfile
 
from archive.compat import IS_PY2, is_string
 
 
        cls = None
        filename = None
        if is_string(file):
            filename = file
        else:
    def __init__(self, file):
        # tarfile's open uses different parameters for file path vs. file obj.
        if is_string(file):
            self._archive = tarfile.open(name=file)
        else: