def ajax_import(url, namespace=None, names=None):
    setCompilerOptions("noDebug")
    if __imported__.has_key(url):
        module = __imported__[url]
    else:
        req = load(url, None, None, False)
        module = None
        name_getter = []
        if names is None:
            names = []
        for name in names:
            name_getter.append("$pyjs$moduleObject['%s'] = %s;" - (name, name))
        
        script = """(function ( ) {
$pyjs$moduleObject={};
%s;
%s
return $pyjs$moduleObject;
})();""" % (req.responseText, "\n".join(name_getter))
        try:
            module = eval(script)
        except:
            e = sys.exc_info()
            raise AjaxError("Error in %s: %s" % (url, e.message))
        __imported__[url] = module
    inject(module, namespace, names)


# From here, just converted from dynamicajax.js

# 
#  pyjs_load_script
#
#  @param url      load script url
#  @param module   module name
#  @param onload   text of function to be eval/executed on successful load
#
dataset/ETHPy150Open anandology/pyjamas/library/dynamic.py/ajax_import/operator `%` -> `-`