Plugin

class mnemosyne.libmnemosyne.plugin.Plugin(component_manager)

A Plugin is a group of components which can be activated and deactivated by the user when the program is running.

Plugins are used as a separate class, and not as mixins, in order to allow for the fact that a Plugin can group multiple components.

‘components’ is a list of component classes (not instances) that will be registered and/or instantiated when the Plugin becomes active.

Activating and deactivating certain components needs to give rise to certain side effects. It’s cumbersone to implement those in the ‘activate’ and ‘deactivate’ methods of the components, as these also are called when the program is still starting up and the context can be completely different.

activate()
deactivate()

Previous topic

Logger

Next topic

Scheduler

This Page

Quick search