Skip to main content

import_from_cwd

Import module, temporarily including modules in the current directory.

Modules located in the current directory has
precedence over modules located in `sys.path`.
def import_from_cwd(
module: string,
imp: callable,
package: string
) - > module

Import module, temporarily including modules in the current directory. Modules located in the current directory has precedence over modules located in sys.path.

Parameters​

NameTypeDescription
modulestringThe name of the module to import, either as an absolute name or relative to the package
impcallableThe import function to use; defaults to importlib.import_module if not provided
packagestringThe package name to use as an anchor when performing a relative import

Returns​

TypeDescription
moduleThe imported module object loaded with the current working directory prioritized in the search path