Utils

Module utils

export(modname)[source]

Make the decorated object a member of the named module. This will also add the object under its aliases if it has a __aliases__ member, thus this decorator should be before the alias decorator to pick up those names. Alias names which conflict with package names or existing members will be ignored.

load_submodules(basemod, load_all=True, exclude_pattern='(.*[tT]est.*)|(_.*)')[source]

Traverse the source of the module structure starting with module basemod, loading all packages plus all files if loadAll is True, excluding anything whose name matches excludePattern.

Aliases

This module is written for configurable workflow, not currently in use.

alias(*names)[source]

Stores the decorated function or class in the global aliases table under the given names and as the __aliases__ member of the decorated object. This new member will contain all alias names declared for that object.

resolve_name(name)[source]

Search for the declaration (function or class) with the given name. This will first search the list of aliases to see if it was declared with this aliased name, then search treating name as a fully qualified name, then search the loaded modules for one having a declaration with the given name. If no declaration is found, raise ValueError.