Class e.c.p.PluginRegistry(Loggable):

Part of elisa.core.plugin_registry View In Hierarchy

No class docstring
Line # Kind Name Docs
78 Method __init__ Undocumented
181 Method load_plugins Load plugins from self.plugin_dirs.
283 Method enable_plugin Enable a plugin.
301 Method disable_plugin Disable a plugin.
320 Method get_plugins Get the list of available plugins.
332 Method get_enabled_plugins Get the list of enabled plugins.
345 Method get_plugin_names Get the names of the installed plugins.
356 Method create_component Create a component given its path.
def __init__(self, plugin_dirs=None):
Undocumented
def load_plugins(self, plugin_names=None):

Load plugins from self.plugin_dirs.

This function should be called as early as possible at startup, _before_ using any plugin. Note that this function runs without returning to the reactor for as long as it takes. There's no point in making it return before it's done as the plugin environment needs to be setup before any other part of elisa can run correctly.

You can optionally pass a list of plugin names to enable. If you don't or pass None, all the available plugins are enabled.
Parametersplugin_namesthe names of the plugins to enable. If None, all the available plugins are enabled. (type: sequence of strings or None )
def enable_plugin(self, plugin_name):
Enable a plugin.
Parametersplugin_namethe name of the plugin to enable (type: str )
def disable_plugin(self, plugin_name):
Disable a plugin.
Parametersplugin_namethe name of the plugin to disable (type: str )
def get_plugins(self):
Get the list of available plugins.

This call returns (plugin_name, status) tuples, where status is True if
the plugin is enabled, False otherwise.

@return generator yielding (plugin_name, status) tuples
@rtype: C{generator}
def get_enabled_plugins(self):
Get the list of enabled plugins.
Returnsgenerator yielding plugin names (type: generator )
def get_plugin_names(self, path='elisa.plugins'):
Get the names of the installed plugins.
Parameterspathplugin path, defaults to 'elisa.plugins' (type: str )
Returnsa generator object yielding plugin names (type: generator )
def create_component(self, path, config=None, **kwargs):

Create a component given its path.

The path is in module:Component syntax, eg elisa.plugins.my_plugin:MyComponent.
Parameterspaththe component path (type: str )
configthe configuration to set for the component (type: elisa.core.config.Config )
Returnsan instance of the component identified by path (type: elisa.core.component.Component or a subclass )
API Documentation for Elisa Media Center, generated by pydoctor at 2008-09-01 20:02:12.