Loads a python module.
More...
|
| file_path = attr.ib(default=None, kw_only=True) |
|
| mod_name = attr.ib(default=None, kw_only=True) |
|
| module = attr.ib(init=False) |
|
Loads a python module.
file_path (str):
mod_name (str):
◆ __attrs_post_init__()
def lib.module_loader.ModuleLoader.__attrs_post_init__ |
( |
|
self | ) |
|
◆ ctor()
def lib.module_loader.ModuleLoader.ctor |
( |
|
self | ) |
|
Gets constructor from module.
◆ desc()
def lib.module_loader.ModuleLoader.desc |
( |
|
self | ) |
|
◆ doc()
def lib.module_loader.ModuleLoader.doc |
( |
|
self | ) |
|
◆ from_mod()
def lib.module_loader.ModuleLoader.from_mod |
( |
|
m | ) |
|
|
static |
Loads a module from dotted module spec.
◆ from_path()
def lib.module_loader.ModuleLoader.from_path |
( |
|
fn | ) |
|
|
static |
Load module from file path.
Loads a python module given its file path (e.g. /a/b/c/x.py).
If the module is found in sys.path then the equivalen to::
>>> import a.b.c.x
is executed and the module is properly added to sys.modules.
Othewise the module is imported and 'x' is added to sys.modules.
◆ load_file()
def lib.module_loader.ModuleLoader.load_file |
( |
|
self | ) |
|
◆ load_module()
def lib.module_loader.ModuleLoader.load_module |
( |
|
self | ) |
|
◆ name()
def lib.module_loader.ModuleLoader.name |
( |
|
self | ) |
|
◆ reload()
def lib.module_loader.ModuleLoader.reload |
( |
|
self | ) |
|
◆ file_path
lib.module_loader.ModuleLoader.file_path = attr.ib(default=None, kw_only=True) |
|
static |
◆ mod_name
lib.module_loader.ModuleLoader.mod_name = attr.ib(default=None, kw_only=True) |
|
static |
◆ module
lib.module_loader.ModuleLoader.module = attr.ib(init=False) |
|
static |
The documentation for this class was generated from the following file: