Package mathbench :: Package basement :: Module plugin_manager
[hide private]

Source Code for Module mathbench.basement.plugin_manager

 1  #!/usr/bin/python 
 2  # -*- coding: utf-8 -*- 
 3   
 4  """ 
 5  Create a PluginManager. 
 6   
 7  Create it as a Singleton with yapsy. 
 8  """ 
 9   
10  import os  
11   
12  import yapsy 
13  from yapsy.PluginManager import PluginManagerSingleton   
14  from yapsy.ConfigurablePluginManager import ConfigurablePluginManager  
15  from yapsy.AutoInstallPluginManager import  AutoInstallPluginManager 
16  from yapsy.IPlugin import IPlugin 
17           
18  # Make an alias to be used in the app 
19  LabPluginManager = PluginManagerSingleton 
20  # set the required behaviour 
21  LabPluginManager.setBehaviour([ 
22                  ConfigurablePluginManager, 
23                  AutoInstallPluginManager 
24                  ]) 
25