Reference¶
-
origin()¶ Return the loaded module of the function this is called in.
-
load(path)¶ Import a module and call its
loadfunction if it exists.Note
- If no extension is provided
.pyis 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
coreentry.
Calling this multiple times with the same arguments will load different modules.
Returns the result of the
loadfunction or a no-op coroutine.- If no extension is provided
-
drop(path, limit=0)¶ Forget a module after calling its
dropfunction.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
dropfunction or a no-op coroutine.
-
get(name, limit=1)¶ Get the
limith module ofname.