[show private | hide private]

Module epydoc.imports

Module import support for epydoc. imports defines a single public function, import_module, which finds and imports a module, given its module name or its file name.
Function Summary
module import_module(name)
Return the module identified by the given name.

Function Details

import_module

import_module(name)

Return the module identified by the given name. import_module makes some attempts to prevent the imported module from modifying sys and __builtins__. In the future, more sandboxing might be added (e.g., using the rexec module).
Parameters:
name - The name of the module to import. name can either be a module name (such as os.path); a filename (such as epytext.py or multiarray.so); or a directory name (such as site-packages/distutils).
           (type=string)
Returns:
The module with the given name.
           (type=module)
Raises:
ImportError - If there was any problem importing the given object. In particular, an ImportError is raised if the given file does not exist; if the given file name does not name a valid module; or if importing the module causes an exception to be raised.

Generated by Epydoc on Sun Oct 6 03:32:13 2002 http://epydoc.sf.net