

def load(self):
    'load/import reference to obj from named module/obj'
    (module_name, obj_name) = self.location.split(':')
    try:
        module = importlib.import_module(module_name)
    except ImportError:
        raise Exception('Plugin {} module `{}` not found.'.format(self.category, module_name))
    try:
        obj = getattr(module, obj_name)
    except AttributeError:
        raise Exception('Plugin {}:{} module `{}` has no {}.'.format(self.category, self.name, module_name, obj_name))
    return obj

dataset/ETHPy150Open pydoit/doit/doit/plugin.py PluginEntry.load/original