class PluginManagerClass(ConnectorMixin, SignalEmitter, abc.Mapping): (source)
Manager that maintains a set of active plugins
This class is the interface towards the rest of the application to load/unload plugins. It behaves as a dictionary with plugin object names as keys and plugin objects as value
| Class Method | get_plugin_class |
Get the plugin class for a given name |
| Class Method | list_installed_plugins |
Lists plugin names for all installed plugins @returns: a set of plugin names |
| Method | __call__ |
Undocumented |
| Method | __getitem__ |
Undocumented |
| Method | __init__ |
No summary |
| Method | __iter__ |
Undocumented |
| Method | __len__ |
Undocumented |
| Method | load_plugin |
Load a single plugin by name |
| Method | load_plugins_from_preferences |
Calls load_plugin() for each plugin in names but does not raise an exception when loading fails. |
| Method | register_new_extendable |
No summary |
| Method | remove_plugin |
Remove a plugin and it's extensions Fails silently if the plugin is not loaded. @param name: the plugin module name |
| Class Variable | __signals__ |
Undocumented |
| Instance Variable | failed |
Undocumented |
| Instance Variable | insertedobjects |
Undocumented |
| Method | _extend |
Undocumented |
| Method | _extendables |
Undocumented |
| Method | _reset |
Undocumented |
| Instance Variable | _extendable_weakrefs |
Undocumented |
| Instance Variable | _plugins |
Undocumented |
| Instance Variable | _preferences |
Undocumented |
Inherited from ConnectorMixin:
| Method | connectto |
Connect to signals of another object E.g.: |
| Method | connectto_all |
Convenience method to combine multiple calls to connectto(). |
| Method | disconnect_all |
Disconnect all signals that have been connected with connectto and friends. Typically called when you want to destroy this object. |
| Method | disconnect_from |
Disc all signals that have been connected with connectto and friends to a specific object. |
| Method | _disconnect_from |
Undocumented |
| Instance Variable | _connected_signals |
Undocumented |
Inherited from SignalEmitter:
| Method | __new__ |
Undocumented |
| Method | block_signals |
Returns a context manager for blocking one or more signals |
| Method | connect |
Register a handler for a specific object. |
| Method | connect_after |
Like connect() but handler will be called after default handler |
| Method | disconnect |
Undocumented |
| Method | emit |
Undocumented |
| Method | emit_return_first |
Emits a signal and stops emission on the first handler that returns a not-None value. |
| Method | emit_return_iter |
Returns an generator that calls one handler on each iteration and yields the return values. This allows aggregating return values. |
| Method | _connect |
Undocumented |
| Method | _setup_signal |
Undocumented |
| Method | _teardown_signal |
Undocumented |
| Parameters | |
| klass | Undocumented |
| name | the plugin module name |
| Returns | |
| the plugin class object | |
| Parameters | |
| config | a ConfigManager object that is passed along to the plugins and is used to load plugin preferences. Defaults to a VirtualConfigManager for testing. |
Load a single plugin by name
When the plugin was loaded already the existing object will be returned. Thus for each plugin only one instance can be active.
| Parameters | |
| name | the plugin module name |
| Returns | |
| the plugin object | |
| Raises | |
Exception | when loading the plugin failed |
extendable() class decorator unless the option c{register_after_init} was set to False. Relies on obj already being setup correctly by the extendable decorator.