from abc import ABCMeta, abstractmethod class Module(object): __metaclass__ = ABCMeta sharedVars = {} name = "" description = "" vars = [] @abstractmethod def run(self): pass def getVars(self): for var in self.vars: if var in self.sharedVars: continue modvar = __import__(var).getInstance() modvar.query() self.sharedVars[modvar.name] = modvar