예제 #1
0
파일: plugin.py 프로젝트: dcolish/porkchop
 def __init__(self, config_dir, directory=None):
     self.config_dir = config_dir
     self.config = parse_config(os.path.join(self.config_dir, "porkchop.ini"))
     if directory:
         self.plugins.update(self.load_plugins(directory))
     # Load default plugin directory
     here = os.path.abspath(os.path.dirname(__file__))
     self.plugins.update(self.load_plugins(os.path.join(here, "plugins")))
예제 #2
0
파일: plugin.py 프로젝트: dcolish/porkchop
 def __init__(self, config_file):
     self.refresh_interval = 60
     self.force_refresh = False
     self.config = parse_config(config_file) if config_file else {}