module.py
461 Bytes
from abc import ABCMeta, abstractmethod
class Module(object):
__metaclass__ = ABCMeta
name = ""
description = ""
vars = {}
requiredVars = []
@abstractmethod
def execute(self):
pass
def getVars(self):
for var in self.requiredVars:
modvar = __import__(var).getInstance(self.name)
modvar.query()
self.vars[modvar.name] = modvar
def __str__(self):
return self.name