MCPcopy Index your code
hub / github.com/sqlmapproject/sqlmap / load

Function load

thirdparty/bottle/bottle.py:3985–4002  ·  view source on GitHub ↗

Import a module or fetch an object from a module. * ``package.module`` returns `module` as a module object. * ``pack.mod:name`` returns the module variable `name` from `pack.mod`. * ``pack.mod:func()`` calls `pack.mod.func()` and returns the result. The last form a

(target, **namespace)

Source from the content-addressed store, hash-verified

3983
3984
3985def load(target, **namespace):
3986 """ Import a module or fetch an object from a module.
3987
3988 * ``package.module`` returns `module` as a module object.
3989 * ``pack.mod:name`` returns the module variable `name` from `pack.mod`.
3990 * ``pack.mod:func()`` calls `pack.mod.func()` and returns the result.
3991
3992 The last form accepts not only function calls, but any type of
3993 expression. Keyword arguments passed to this function are available as
3994 local variables. Example: ``import_string('re:compile(x)', x='[a-z]')``
3995 """
3996 module, target = target.split(":", 1) if ':' in target else (target, None)
3997 if module not in sys.modules: __import__(module)
3998 if not target: return sys.modules[module]
3999 if target.isalnum(): return getattr(sys.modules[module], target)
4000 package_name = module.split('.')[0]
4001 namespace[package_name] = sys.modules[package_name]
4002 return eval('%s.%s' % (module, target), namespace)
4003
4004
4005def load_app(target):

Callers 4

decoratorMethod · 0.85
load_moduleMethod · 0.85
load_appFunction · 0.85
runFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…