pydocmk2.imp
pydocmk2.imp
This module provides utilities for importing Python objects by name.
Modules
- inspect
- types
Functions
- dir_object(name, sort_order, need_docstrings=True)
- force_lazy_import(name)
-
Import any modules off of "name" by iterating a new list rather than a generator so that this library works with lazy imports.
- import_module(name)
-
Imports a Python module assuming that the whole *name* identifies only a Python module and no symbol inside a Python module.
- import_object(name)
-
Like #import_object_with_scope() but returns only the object.
- import_object_with_scope(name)
-
Imports a Python object by an absolute identifier. # Arguments name (str): The name of the Python object to import. # Returns (any, Module): The object and the module that contains it. Note that for plain modules loaded with this function, both elements of the tuple may be the same object.
import_module
- pydocmk2.imp.import_module = import_module(name)
-
Imports a Python module assuming that the whole *name* identifies only a Python module and no symbol inside a Python module.
import_object
- pydocmk2.imp.import_object = import_object(name)
-
Like #import_object_with_scope() but returns only the object.
import_object_with_scope
- pydocmk2.imp.import_object_with_scope = import_object_with_scope(name)
-
Imports a Python object by an absolute identifier. # Arguments name (str): The name of the Python object to import. # Returns (any, Module): The object and the module that contains it. Note that for plain modules loaded with this function, both elements of the tuple may be the same object.
force_lazy_import
- pydocmk2.imp.force_lazy_import = force_lazy_import(name)
-
Import any modules off of "name" by iterating a new list rather than a generator so that this library works with lazy imports.