corelp.rfrom module

corelp.rfrom(module, *functions)[source]

This function allows to do a relative import that works in module and script modes.

Parameters:
  • module (str) – Name of relative module (with the point).

  • functions (str) – Names of objects to import from module.

Returns:

imported – objects imported.

Return type:

object

Examples

>>> from corelp import rfrom
...
>>> func = rfrom(".module", "func")
>>> func1, func2 = rfrom(".module", "func1", "func2")