imp
index
(built-in)
Module Docs

This module provides the components needed to build your own
__import__ function.  Undocumented functions are obsolete.

 
Classes
       
__builtin__.object
NullImporter

 
class NullImporter(__builtin__.object)
    Null importer object
 
  Methods defined here:
__init__(...)
x.__init__(...) initializes x; see help(type(x)) for signature
find_module(...)
Always return None

Data and other attributes defined here:
__new__ = <built-in method __new__ of type object>
T.__new__(S, ...) -> a new object with type S, a subtype of T

 
Functions
       
acquire_lock(...)
acquire_lock() -> None
Acquires the interpreter's import lock for the current thread.
This lock should be used by import hooks to ensure thread-safety
when importing modules.
On platforms without threads, this function does nothing.
find_module(...)
find_module(name, [path]) -> (file, filename, (suffix, mode, type))
Search for a module.  If path is omitted or None, search for a
built-in, frozen or special module and continue search in sys.path.
The module name cannot contain '.'; to search for a submodule of a
package, pass the submodule name and the package's __path__.
get_frozen_object(...)
get_magic(...)
get_magic() -> string
Return the magic number for .pyc or .pyo files.
get_suffixes(...)
get_suffixes() -> [(suffix, mode, type), ...]
Return a list of (suffix, mode, type) tuples describing the files
that find_module() looks for.
init_builtin(...)
init_frozen(...)
is_builtin(...)
is_frozen(...)
load_compiled(...)
load_dynamic(...)
load_module(...)
load_module(name, file, filename, (suffix, mode, type)) -> module
Load a module, given information returned by find_module().
The module name must include the full package name, if any.
load_package(...)
load_source(...)
lock_held(...)
lock_held() -> boolean
Return True if the import lock is currently held, else False.
On platforms without threads, return False.
new_module(...)
new_module(name) -> module
Create a new module.  Do not enter it in sys.modules.
The module name must include the full package name, if any.
release_lock(...)
release_lock() -> None
Release the interpreter's import lock.
On platforms without threads, this function does nothing.
reload(...)
reload(module) -> module
 
Reload the module.  The module must have been successfully imported before.

 
Data
        C_BUILTIN = 6
C_EXTENSION = 3
IMP_HOOK = 9
PKG_DIRECTORY = 5
PY_CODERESOURCE = 8
PY_COMPILED = 2
PY_FROZEN = 7
PY_RESOURCE = 4
PY_SOURCE = 1
SEARCH_ERROR = 0