portage.module module¶
- exception portage.module.InvalidModuleName(value)¶
Bases:
portage.exception.PortageException
An invalid or unknown module name.
- args¶
- with_traceback()¶
Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.
- class portage.module.Module(name, namepath)¶
Bases:
object
Class to define and hold our plug-in module
- Parameters
name (string) – the module name
- _initialize()¶
Initialize the plug-in module
- Return type
boolean
- get_class(name)¶
- exception portage.module.ModuleVersionError(value)¶
Bases:
portage.exception.PortageException
An incompatible module version
- args¶
- with_traceback()¶
Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.
- class portage.module.Modules(path, namepath, compat_versions=None)¶
Bases:
object
Dynamic modules system for loading and retrieving any of the installed emaint modules and/or provided class’s
- Parameters
path – Path to the “modules” directory
namepath – Python import path to the “modules” directory
- _check_compat(module)¶
- _get_all_modules()¶
scans the _module_path dir for loadable modules
- Return type
dictionary of module_plugins
- get_class(modname)¶
Retrieves a module class desired
- Parameters
modname (string) – the module class name
- get_description(modname)¶
Retrieves the module class decription
- Parameters
modname (string) – the module class name
:type string :return: the modules class decription
- get_func_descriptions(modname)¶
Retrieves the module class exported functions descriptions
- Parameters
modname (string) – the module class name
:type dictionary :return: the modules class exported functions descriptions
- get_functions(modname)¶
Retrieves the module class exported function names
- Parameters
modname (string) – the module class name
:type list :return: the modules class exported function names
- get_module_names()¶
Convenience function to return the list of installed modules available
- Return type
list
- Returns
the installed module names available
- get_opt_descriptions(modname)¶
Retrieves the module class exported options descriptions
- Parameters
modname (string) – the module class name
:type dictionary :return: the modules class exported options descriptions
- get_spec(modname, var)¶
Retrieves the module class exported spec variable
- Parameters
modname (string) – the module class name
var (string) – the base level variable to return
:type dictionary :return: the modules class exported options descriptions