class documentation
Lazy module class.
Lazy modules are imported into the given namespaces whenever a non-special attribute (there are some attributes like __doc__ that class instances handle without calling __getattr__) is requested. The module is then registered under the given name in locals usually replacing the import wrapper instance. The import itself is done using globals as global namespace.
Example of creating a lazy load module:
ISO = LazyModule('ISO',locals(),globals())
Later, requesting an attribute from ISO will load the module automatically into the locals() namespace, overriding the LazyModule instance:
t = ISO.Week(1998,1,1)
| Method | __getattr__ |
Import the module on demand and get the attribute. |
| Method | __init__ |
Create a LazyModule instance wrapping module name. |
| Method | __repr__ |
Undocumented |
| Method | __setattr__ |
Import the module on demand and set the attribute. |
| Instance Variable | __name__ |
Undocumented |
| Method | __lazymodule |
Import the module now. |
| Class Variable | __lazymodule |
Undocumented |
| Instance Variable | __lazymodule |
Undocumented |
| Instance Variable | __lazymodule |
Undocumented |
| Instance Variable | __lazymodule |
Undocumented |
| Instance Variable | __lazymodule |
Undocumented |