try:
    module = __import__(modname)
except (ImportError, NotImplementedError):
    continue
for cls in dir(module):
    cls = getattr(module, cls)
if inspect.isclass(cls) and inspect.getmodule(cls) == module and issubclass(cls
    , base):
    classList.append(cls)
print(classList)
search(PluginBase)
Dynamic importing of modules followed by instantiation of objects with a certain baseclass from said modules