Package conary :: Package lib :: Module importer
[hide private]
[frames] | no frames]

Module importer

source code

Defines an on-demand importer that only actually loads modules when their attributes are accessed. NOTE: if the ondemand module is viewed using introspection, like dir(), isinstance, etc, it will appear as a ModuleProxy, not a module, and will not have the correct attributes. Barring introspection, however, the module will behave as normal.

Classes [hide private]
  OnDemandLoader
The loader takes a name and info about the module to load and "loads" it - in this case returning loading a proxy that will only load the class when an attribute is accessed.
  OnDemandImporter
The on-demand importer imports a module proxy that inserts the desired module into the calling scope only when an attribute from the module is actually used.
Functions [hide private]
 
makeImportedModule(name, pathname, desc, scope)
Returns a ModuleProxy that has access to a closure w/ information about the module to load, but is otherwise empty.
source code
 
install() source code
Function Details [hide private]

makeImportedModule(name, pathname, desc, scope)

source code 
Returns a ModuleProxy that has access to a closure w/ information about the module to load, but is otherwise empty. On an attempted access of any member of the module, the module is loaded.