imp

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

Functions

acquire_lock(() -> None) Acquires the interpreter’s import lock for the current thread.
find_module(name, [path]) -> (file, ...) Search for a module.
get_frozen_object
get_magic(() -> string) Return the magic number for .pyc or .pyo files.
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((name, file, filename, (suffix, ...) Load a module, given information returned by find_module().
load_package
load_source
lock_held(() -> boolean) Return True if the import lock is currently held, else False.
new_module((name) -> module) Create a new module.
release_lock(() -> None) Release the interpreter’s import lock.
reload((module) -> module) Reload the module.

Classes

NullImporter Null importer object