예제 #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)
예제 #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)
예제 #3
0
파일: core.py 프로젝트: mashiro/fortunella
 def __init__(self):
     self.logger = getlogger(self)
     self.plugin_manager = PluginManager(self)
예제 #4
0
파일: core.py 프로젝트: mashiro/fortunella
 def __init__(self, config):
     self.config = config
     self.logger = getlogger(self)
예제 #5
0
 def __init__(self, plugin):
     self.priority = 100
     self.logger = getlogger(self)
     self.plugin = plugin
     self.core = plugin.core