Loader: Loading of task definition files

class invoke.loader.Loader(root=None)

Creates a loader object with search root directory of root.

If not given, root defaults to os.getcwd.

__init__(root=None)

Creates a loader object with search root directory of root.

If not given, root defaults to os.getcwd.

find_collection(name)

Seek towards FS root from self.root for Python module name.

Returns a tuple suitable for use in imp.load_module.

load_collection(name=None)

Load and return collection named name.

If not given, looks for a "tasks" collection by default.

update_path(path)

Ensures self.root is added to a copy of the given path iterable.

It is up to the caller to assign the return value to e.g. sys.path.

Previous topic

Executor: Task execution machinery

Next topic

parser: Command-line parser

This Page