| | |
- __builtin__.object
-
- zipimporter
- exceptions.ImportError(exceptions.StandardError)
-
- ZipImportError
class zipimporter(__builtin__.object) |
| |
zipimporter(archivepath) -> zipimporter object
Create a new zipimporter instance. 'archivepath' must be a path to
a zipfile. ZipImportError is raised if 'archivepath' doesn't point to
a valid Zip archive. |
| |
Methods defined here:
- __getattribute__(...)
- x.__getattribute__('name') <==> x.name
- __init__(...)
- x.__init__(...) initializes x; see x.__class__.__doc__ for signature
- __repr__(...)
- x.__repr__() <==> repr(x)
- find_module(...)
- find_module(fullname, path=None) -> self or None.
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.
- get_code(...)
- get_code(fullname) -> code object.
Return the code object for the specified module. Raise ZipImportError
is the module couldn't be found.
- get_data(...)
- get_data(pathname) -> string with file data.
Return the data associated with 'pathname'. Raise IOError if
the file wasn't found.
- get_source(...)
- get_source(fullname) -> source string.
Return the source code for the specified module. Raise ZipImportError
is the module couldn't be found, return None if the archive does
contain the module, but has no source for it.
- is_package(...)
- is_package(fullname) -> bool.
Return True if the module specified by fullname is a package.
Raise ZipImportError is the module couldn't be found.
- load_module(...)
- load_module(fullname) -> module.
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.
Data descriptors defined here:
- archive
- prefix
Data and other attributes defined here:
- __new__ = <built-in method __new__ of type object at 0x73c920>
- T.__new__(S, ...) -> a new object with type S, a subtype of T
| |