modules.py 279 B

123456789
  1. import pkgutil
  2. import sys
  3. def load_class(_class_name, _context):
  4. # dynamically load all available macop solutions
  5. loader = pkgutil.find_loader('macop.solutions.' + _class_name)
  6. _module = loader.load_module()
  7. _context['macop.solutions.' + _class_name] = _module