pyirk.irkloader
Module Contents
Functions
This is a decorator that ensures that the current working directory is unchanged during the function call. |
|
:param modpath: file system path for the module to be loaded :param prefix: prefix which can be used to replace the URI for convenience :param modname: :param allow_reload: flag; if False, an error is raised if the module was already loaded :param smart_relative: flag; if True, relative paths are interpreted w.r.t. the calling module (not w.r.t. current working path) :param reuse_loaded: flag; if True and the module was already loaded before, then just use this if False:: reload; if None use the default action from pyirk.ds :param delete_bytecode: flag; if true delete the matching content of pycache :return: |
|
see docstring of load_mod_from_path |
|
Clean up some data structures if something went wrong during module load. This helps to keep the tests independent. |
Data
API
- pyirk.irkloader.ModuleType
‘type(…)’
- pyirk.irkloader.preserve_cwd(function)
This is a decorator that ensures that the current working directory is unchanged during the function call.
- pyirk.irkloader.delete_bytecode_files(modpath)
- pyirk.irkloader.load_mod_from_path(modpath: str, prefix: str, modname=None, allow_reload=True, smart_relative=None, reuse_loaded=None, delete_bytecode=None) pyirk.irkloader.ModuleType
:param modpath: file system path for the module to be loaded :param prefix: prefix which can be used to replace the URI for convenience :param modname: :param allow_reload: flag; if False, an error is raised if the module was already loaded :param smart_relative: flag; if True, relative paths are interpreted w.r.t. the calling module (not w.r.t. current working path) :param reuse_loaded: flag; if True and the module was already loaded before, then just use this if False:: reload; if None use the default action from pyirk.ds :param delete_bytecode: flag; if true delete the matching content of pycache :return:
- pyirk.irkloader._load_mod_from_path(modpath: str, prefix: str, modname=None, allow_reload=True, smart_relative=None, reuse_loaded=False) pyirk.irkloader.ModuleType
see docstring of load_mod_from_path
- pyirk.irkloader._cleanup(mod_uri, modname, original_loaded_mod_uris)
Clean up some data structures if something went wrong during module load. This helps to keep the tests independent.