##// END OF EJS Templates
unknown command fixups...
unknown command fixups -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 unknown command fixups from Andrew Thompson manifest hash: 3ed1956585a905a52d93491ea95096be23c9acf8 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.0 (GNU/Linux) iD8DBQFCpVTaywK+sNU5EO8RAkvLAJ0ff8/kVQc93jGy5t1uJ5R8m0M4OACfZ1Ba O7CldaLkwEzqybw/5iL6NAw= =WGtU -----END PGP SIGNATURE-----

File last commit:

r262:3db70014 default
r268:1634a7ea default
Show More
demandload.py
15 lines | 384 B | text/x-python | PythonLexer
def demandload(scope, modules):
class d:
def __getattr__(self, name):
mod = self.__dict__["mod"]
scope = self.__dict__["scope"]
scope[mod] = __import__(mod, scope, scope, [])
return getattr(scope[mod], name)
for m in modules.split():
dl = d()
dl.mod = m
dl.scope = scope
scope[m] = dl