コード例 #1
0
ファイル: common.py プロジェクト: Blender3D/scrapeman
    def __init__(self, handle):
        self._temp_archive = None

        if isinstance(handle, basestring):
            zipimporter.__init__(self, handle)
        else:
            with tempfile.NamedTemporaryFile(suffix='.egg', delete=False) as temp_handle:
                shutil.copyfileobj(handle, temp_handle)
                self._temp_archive = temp_handle.name

            zipimporter.__init__(self, self._temp_archive)
コード例 #2
0
ファイル: test_zipimport_jy.py プロジェクト: Britefury/jython
 def __init__(self):
     zipimporter.__init__(self, test_support.findfile('zipdir.zip'))
     self.bar = "bar"
コード例 #3
0
ファイル: test_zipimport_jy.py プロジェクト: dieterv77/jython
 def __init__(self):
     zipimporter.__init__(self, test_support.findfile('zipdir.zip'))
     self.bar = "bar"