Reference¶
-
origin
()¶ Return the loaded module of the function this is called in.
-
load
(path)¶ Import a module and call its
load
function if it exists.Note
- If no extension is provided
.py
is used. - Packages are valid targets and relative imports are allowed.
- Calling in another loaded module prepends the current directory.
- Targeting non-package directories uses their
core
entry.
Calling this multiple times with the same arguments will load different modules.
Returns the result of the
load
function or a no-op coroutine.- If no extension is provided
-
drop
(path, limit=0)¶ Forget a module after calling its
drop
function.Uses the same target methods as in
load()
. Only works for modules imported through there.If multiple modules of the same info have been loaded, they are targetted by loading order.
Returns the result of the
drop
function or a no-op coroutine.
-
get
(name, limit=1)¶ Get the
limit
h module ofname
.