##// END OF EJS Templates
Merge with TAH...
Merge with TAH -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Merge with TAH manifest hash: 18cf61cc2b6611d74ffc490b6b733537b879d69e -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.0 (GNU/Linux) iD8DBQFCsQy7ywK+sNU5EO8RAoi/AKCC0XbK73oemLr52KOQWEK4WlE9pgCgkk/8 C/m6MZJqlOKhIT4jazPwngU= =ECGy -----END PGP SIGNATURE-----

File last commit:

r262:3db70014 default
r380:c72ccad3 merge 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