Package pyamf :: Package util :: Module imports
[hide private]
[frames] | no frames]

Module imports

source code

Tools for doing dynamic imports.


Since: 0.3

Classes [hide private]
  ModuleFinder
This is a special module finder object that executes a collection of callables when a specific module has been imported.
Functions [hide private]
 
when_imported(name, *hooks)
Call hook(module) when module named name is first imported.
source code
 
_init()
Internal function to install the module finder.
source code
Variables [hide private]
  finder = None
  __package__ = 'pyamf.util'
  __warningregistry__ = {('the sets module is deprecated', <type...

Imports: sys


Function Details [hide private]

when_imported(name, *hooks)

source code 

Call hook(module) when module named name is first imported. name must be a fully qualified (i.e. absolute) module name.

hook must accept one argument: which will be the imported module object.

If the module has already been imported, 'hook(module)' is called immediately, and the module object is returned from this function. If the module has not been imported, then the hook is called when the module is first imported.


Variables Details [hide private]

__warningregistry__

Value:
{('the sets module is deprecated',
  <type 'exceptions.DeprecationWarning'>,
  83): True}