Beispiel #1
0
    def __init__(self, core):
        self.logger = getlogger(self)
        self.core = core
        self.callbackmap = {}
        self.plugins = []

        # create plugins dummy module.
        self.plugin_module_name = 'fortunella.plugins'
        sys.modules[self.plugin_module_name] = imp.new_module(self.plugin_module_name)
        self.class_loader = ClassLoader(logger=self.logger, base=Plugin, callback=self._plugin_loaded)
Beispiel #2
0
 def __init__(self, core, manager):
     self.core = core
     self.manager = manager
     self.logger = getlogger(self)
     self.register = self.manager.register
     self.datafile = partial(self.manager.datafile, self)
Beispiel #3
0
 def __init__(self):
     self.logger = getlogger(self)
     self.plugin_manager = PluginManager(self)
Beispiel #4
0
 def __init__(self, config):
     self.config = config
     self.logger = getlogger(self)
Beispiel #5
0
 def __init__(self, plugin):
     self.priority = 100
     self.logger = getlogger(self)
     self.plugin = plugin
     self.core = plugin.core