zipimport.zipimporter.prefix

prefix The subpath within the ZIP file where modules are searched. This is the empty string for zipimporter objects which point to the root of the ZIP file.

zipimport.ZipImportError

exception zipimport.ZipImportError Exception raised by zipimporter objects. It’s a subclass of ImportError, so it can be caught as ImportError, too.

zlib.Compress.copy()

Compress.copy() Returns a copy of the compression object. This can be used to efficiently compress a set of data that share a common initial prefix.

zipimport.zipimporter.load_module()

load_module(fullname) Load the module specified by fullname. fullname must be the fully qualified (dotted) module name. It returns the imported module, or raises ZipImportError if it wasn’t found.

zlib.Compress.compress()

Compress.compress(data) Compress data, returning a bytes object containing compressed data for at least part of the data in data. This data should be concatenated to the output produced by any preceding calls to the compress() method. Some input may be kept in internal buffers for later processing.

zipimport.zipimporter.find_module()

find_module(fullname[, path]) Search for a module specified by fullname. fullname must be the fully qualified (dotted) module name. It returns the zipimporter instance itself if the module was found, or None if it wasn’t. The optional path argument is ignored—it’s there for compatibility with the importer protocol.

zipimport.zipimporter.get_source()

get_source(fullname) Return the source code for the specified module. Raise ZipImportError if the module couldn’t be found, return None if the archive does contain the module, but has no source for it.

zipimport.zipimporter.is_package()

is_package(fullname) Return True if the module specified by fullname is a package. Raise ZipImportError if the module couldn’t be found.

zipimport.zipimporter.archive

archive The file name of the importer’s associated ZIP file, without a possible subpath.

zipimport.zipimporter.get_data()

get_data(pathname) Return the data associated with pathname. Raise OSError if the file wasn’t found. Changed in version 3.3: IOError used to be raised instead of OSError.