Parse a Python module file.
This module is based on pyclbr.py as of Python 2.2.2
BUGS (from pyclbr.py)
Class | Class to represent a Python class. |
Function | Class to represent a Python function or method. |
Module | Class to represent a Python module. |
RbModule | Class to represent a Ruby module. |
_indent | Protected function to determine the indent width of a whitespace string. |
find_module | Module function to extend the Python module finding mechanism. |
readModule | Function to read a module file and parse it. |
resetParsedModule | Module function to clear one module from the list of parsed modules. |
resetParsedModules | Module function to reset the list of modules already parsed. |
Class to represent a Python class.
Class | Constructor |
_addattribute | Protected method to add information about attributes. |
_adddescription | Protected method to store the class docstring. |
_addmethod | Protected method to add information about a method. |
Constructor
Protected method to add information about attributes.
Protected method to store the class docstring.
Protected method to add information about a method.
Class to represent a Python function or method.
Function | Constructor |
_adddescription | Protected method to store the functions docstring. |
Constructor
Protected method to store the functions docstring.
Class to represent a Python module.
Module | Constructor |
__py_scan | Privaet method to scan the source text of a Python module and retrieve the relevant information. |
__rb_scan | Private method to scan the source text of a Python module and retrieve the relevant information. |
_addclass | Protected method to add information about a class. |
_adddescription | Protected method to store the modules docstring. |
_addfunction | Protected method to add information about a function. |
_addmodule | Protected method to add information about a Ruby module. |
addPathToHierarchy | Public method to put the exhausted path into the result dictionary. |
assembleHierarchy | Public method to assemble the inheritance hierarchy. |
createHierarchy | Public method to build the inheritance hierarchy for all classes of this module. |
getFileName | Public method to retrieve the modules filename. |
getName | Public method to retrieve the modules name. |
scan | Public method to scan the source text and retrieve the relevant information. |
Constructor
Privaet method to scan the source text of a Python module and retrieve the relevant information.
Private method to scan the source text of a Python module and retrieve the relevant information.
Protected method to add information about a class.
Protected method to store the modules docstring.
Protected method to add information about a function.
Protected method to add information about a Ruby module.
Public method to put the exhausted path into the result dictionary.
Public method to assemble the inheritance hierarchy.
This method will traverse the class hierarchy, from a given class and build up a nested dictionary of super-classes. The result is intended to be inverted, i.e. the highest level are the super classes.
This code is borrowed from Boa Constructor.
Public method to build the inheritance hierarchy for all classes of this module.
Public method to retrieve the modules filename.
Public method to retrieve the modules name.
Public method to scan the source text and retrieve the relevant information.
Class to represent a Ruby module.
RbModule | Constructor |
_addclass | Protected method to add information about a class. |
Constructor
Protected method to add information about a class.
Protected function to determine the indent width of a whitespace string.
Module function to extend the Python module finding mechanism.
This function searches for files in the given path. If the filename doesn't have an extension or an extension of .py, the normal search implemented in the imp module is used. For all other supported files only path is searched.
Function to read a module file and parse it.
The module is searched in path and sys.path, read and parsed. If the module was parsed before, the information is taken from a cache in order to speed up processing.
Module function to clear one module from the list of parsed modules.
Module function to reset the list of modules already parsed.