##// END OF EJS Templates
Updated TODO...
Updated TODO -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Updated TODO manifest hash: d56c5efd51558453626e53cb8e5802d7c64cbb2c -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.1 (GNU/Linux) iD8DBQFCstaMW7P1GVgWeRoRAitJAKCKQ+EE1LBTBu7kMkR6Je0uQSQ4rwCcDTpd D9Yes77z/o00nq0g/kiT+pw= =SFsE -----END PGP SIGNATURE-----

File last commit:

r262:3db70014 default
r389:ef8ff43f 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