readmodule_ex(module [, path])
where module is the name of a Python module, and path is an optional
list of directories where the module is to be searched. If present,
-path is prepended to the system search path sys.path. The return
-value is a dictionary. The keys of the dictionary are the names of
-the classes defined in the module (including classes that are defined
-via the from XXX import YYY construct). The values are class
-instances of the class Class defined here. One special key/value pair
-is present for packages: the key '__path__' has a list as its value
-which contains the package search path.
+path is prepended to the system search path sys.path. The return value
+is a dictionary. The keys of the dictionary are the names of the
+classes and top-level functions defined in the module (including ones
+that are defined via the from XXX import YYY construct). The values are
+instances of the classes Class and Function defined here. One special
+key/value pair is present for packages: the key '__path__' has as its
+value a list which contains the package search path.
+
+(For compatibility, a function readmodule is also defined: it works just
+like readmodule_ex, but the dictionary it returns has only key/value
+pairs whose value is an instance of class Class, _not_ ones for which it
+would be an instance of Function. nor the special key/value pair for key
+'__path__' as described in the previous paragraph).
A class is described by the class Class in this module. Instances
of this class have the following instance variables:
A function is described by the class Function in this module.
Instances of this class have the following instance variables:
module -- the module name
- name -- the name of the class
- file -- the file in which the class was defined
- lineno -- the line in the file on which the class statement occurred
+ name -- the name of the function
+ file -- the file in which the function was defined
+ lineno -- the line in the file on which the def statement occurred
"""
import sys