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

All Samples(14)  |  Call(12)  |  Derive(0)  |  Import(2)
A plugin manager that finds plugins in packages on the 'plugin_path'.

All items in 'plugin_path' are directory names and they are all added to
'sys.path' (if not already present). Each directory is then searched for
plugins as follows:-

a) If the package contains a 'plugins.py' module, then we import it and
look for a callable 'get_plugins' that takes no arguments and returns
a list of plugins (i.e. instances that implement 'IPlugin'!).
(more...)

src/e/n/envisage-4.4.0/envisage/tests/package_plugin_manager_test_case.py   envisage(Download)
from os.path import dirname, join
 
from envisage.package_plugin_manager import PackagePluginManager
from traits.testing.unittest_tools import unittest
 
    def test_find_plugins_in_packages_on_the_plugin_path(self):
 
        plugin_manager = PackagePluginManager(plugin_path=[self.plugins_dir])
        ids            = [plugin.id for plugin in plugin_manager]
 
 
        plugin_manager = PackagePluginManager(
            plugin_path = [self.plugins_dir],
            include     = include
        )
 
        plugin_manager = PackagePluginManager(
            plugin_path = [self.plugins_dir],
            include     = include
        )
 
        plugin_manager = PackagePluginManager(
            plugin_path = [self.plugins_dir],
            exclude     = exclude
        )

src/e/n/envisage-HEAD/envisage/tests/package_plugin_manager_test_case.py   envisage(Download)
from os.path import dirname, join
 
from envisage.package_plugin_manager import PackagePluginManager
from traits.testing.unittest_tools import unittest
 
    def test_find_plugins_in_packages_on_the_plugin_path(self):
 
        plugin_manager = PackagePluginManager(plugin_path=[self.plugins_dir])
        ids            = [plugin.id for plugin in plugin_manager]
 
 
        plugin_manager = PackagePluginManager(
            plugin_path = [self.plugins_dir],
            include     = include
        )
 
        plugin_manager = PackagePluginManager(
            plugin_path = [self.plugins_dir],
            include     = include
        )
 
        plugin_manager = PackagePluginManager(
            plugin_path = [self.plugins_dir],
            exclude     = exclude
        )