zipimport.zipimporter¶
-
class
zipimport.zipimporter¶ Create a new zipimporter instance. ‘archivepath’ must be a path to a zipfile, or to a specific path inside a zipfile. For example, it can be ‘/tmp/myimport.zip’, or ‘/tmp/myimport.zip/mydirectory’, if mydirectory is a valid directory inside the archive.
‘ZipImportError is raised if ‘archivepath’ doesn’t point to a valid Zip archive.
The ‘archive’ attribute of zipimporter objects contains the name of the zipfile targeted.
Methods¶
__format__ |
default object formatter |
__new__((S, ...) |
|
__reduce__ |
helper for pickle |
__reduce_ex__ |
helper for pickle |
__sizeof__(() -> int) |
size of object in memory, in bytes |
__subclasshook__ |
Abstract classes can override this to customize issubclass(). |
find_module((fullname[, path]) |
Search for a module specified by ‘fullname’. |
get_code((fullname) -> code object.) |
Return the code object for the specified module. |
get_data((pathname) -> string with file data.) |
Return the data associated with ‘pathname’. |
get_filename((fullname) -> filename string.) |
Return the filename for the specified module. |
get_source((fullname) -> source string.) |
Return the source code for the specified module. |
is_package((fullname) -> bool.) |
Return True if the module specified by fullname is a package. |
load_module((fullname) -> module.) |
Load the module specified by ‘fullname’. |