##// END OF EJS Templates
Add removing print to TODO...
Add removing print to TODO -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Add removing print to TODO manifest hash: 42be0c5bc52258bd3399f19257398f02af16c5ee -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.0 (GNU/Linux) iD8DBQFCw41HywK+sNU5EO8RAvRIAKCd6o7sSJIXXMZa/i9o1CyIH0GhLgCePs5U 1BkkXUN2RcqfOpDqe6cUIW0= =aOPc -----END PGP SIGNATURE-----

File last commit:

r262:3db70014 default
r530:c5b8ed03 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