def start_cython(): """ Load all Python packages and initialize the Pure-Cython wrapper. Potentially a very long operation """ from wise.translators.pure_wrap import init_pure from wise.translators.mathobjects import (build_cython_objects, build_rule_lookup) # ORDER IS VERY IMPORTANT init_pure() build_cython_objects() build_rule_lookup()
def __getattr__(self, name): from wise import settings from wise.translators.pure_wrap import init_pure if not self.interface: self.interface = init_pure() if settings.DEBUG: print 'Invoking interpreter because pureobjects.py requested object.' return self.interface[name]