def dispatch(self, modname, helix, argv): """ Runs the main method of the selected module. """ try: mod = self.mod[pypath(path_base())+modname] except KeyError: raise ModuleNotFound mod.execute(helix, argv) return
def __init__(self): super(BaseMod, self).__init__() self.author = tuple() for module in os.listdir(path_base()): if os.path.isfile(path_base() + module) and module != "__init__.py": self.load(pypath(path_base())+module.replace(".py", "")) # Authors auth = [] for key in self.mod: try: amod = self.mod[key].__author__ sauth = amod.split(",") for author in sauth: if not (author in auth): auth.append(author) except AttributeError: pass if auth: self.author = tuple(sorted(auth))