Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(22)  |  Call(18)  |  Derive(0)  |  Import(4)
A simple plugin manager implementation.

This implementation manages an explicit collection of plugin instances,
e.g::

    plugin_manager = PlugunManager(
         plugins = [
             MyPlugin(),
             YourPlugin()
         ](more...)

src/e/n/envisage-4.4.0/envisage/tests/plugin_manager_test_case.py   envisage(Download)
""" Tests for the plugin manager. """
 
 
# Enthought library imports.
from envisage.api import Plugin, PluginManager
    def test_get_plugin(self):
        """ get plugin """
 
        simple_plugin  = SimplePlugin()
        plugin_manager = PluginManager(plugins=[simple_plugin])
        bad_plugin    = BadPlugin()
 
        plugin_manager = PluginManager(plugins=[simple_plugin, bad_plugin])
 
        # Iterate over the plugin manager's plugins.
    def test_start_and_stop(self):
        """ start and stop """
 
        simple_plugin  = SimplePlugin()
        plugin_manager = PluginManager(plugins=[simple_plugin])
        simple_plugin  = SimplePlugin()
        bad_plugin     = BadPlugin()
        plugin_manager = PluginManager(plugins=[simple_plugin, bad_plugin])
 
        # Start the plugin manager. This starts all of the plugin manager's

src/e/n/envisage-HEAD/envisage/tests/plugin_manager_test_case.py   envisage(Download)
""" Tests for the plugin manager. """
 
 
# Enthought library imports.
from envisage.api import Plugin, PluginManager
    def test_get_plugin(self):
        """ get plugin """
 
        simple_plugin  = SimplePlugin()
        plugin_manager = PluginManager(plugins=[simple_plugin])
        bad_plugin    = BadPlugin()
 
        plugin_manager = PluginManager(plugins=[simple_plugin, bad_plugin])
 
        # Iterate over the plugin manager's plugins.
    def test_start_and_stop(self):
        """ start and stop """
 
        simple_plugin  = SimplePlugin()
        plugin_manager = PluginManager(plugins=[simple_plugin])
        simple_plugin  = SimplePlugin()
        bad_plugin     = BadPlugin()
        plugin_manager = PluginManager(plugins=[simple_plugin, bad_plugin])
 
        # Start the plugin manager. This starts all of the plugin manager's

src/e/n/envisage-4.4.0/envisage/tests/application_test_case.py   envisage(Download)
from traits.etsconfig.api import ETSConfig
from envisage.api import Application, ExtensionPoint
from envisage.api import Plugin, PluginManager
from traits.api import Bool, Int, List
 
        # Start off with just two of the plugins.
        application = TestApplication(
            plugin_manager=PluginManager(plugins=[a, b, c])
        )
        application.start()

src/e/n/envisage-HEAD/envisage/tests/application_test_case.py   envisage(Download)
from traits.etsconfig.api import ETSConfig
from envisage.api import Application, ExtensionPoint
from envisage.api import Plugin, PluginManager
from traits.api import Bool, Int, List
 
        # Start off with just two of the plugins.
        application = TestApplication(
            plugin_manager=PluginManager(plugins=[a, b, c])
        )
        application.start()