envisage.i_plugin module

The plugin interface.

class envisage.i_plugin.IPlugin[source]

Bases: traits.has_traits.Interface

The plugin interface.

activator = Instance(IPluginActivator)

The activator used to start and stop the plugin.

application = Instance("envisage.api.IApplication")

The application that the plugin is part of.

home = Str

The name of a directory (created for you) that the plugin can read and write to at will.

id = Str

The plugin’s unique identifier.

Where ‘unique’ technically means ‘unique within the plugin manager’, but since the chances are that you will want to include plugins from external sources, this really means ‘globally unique’! Using the Python package path might be useful here. e.g. ‘envisage’.

name = Str

The plugin’s name (suitable for displaying to the user).

start()[source]

Start the plugin.

This method is called by the framework when the application is starting up. If you want to start a plugin manually use:

application.start_plugin(plugin)
stop()[source]

Stop the plugin.

This method is called by the framework when the application is stopping. If you want to stop a plugin manually use:

application.stop_plugin(plugin)