Parse a Python module file.
BUGS (from pyclbr.py)
PTL_SOURCE |
PY_SOURCE |
RB_SOURCE |
SEARCH_ERROR |
SUPPORTED_TYPES |
TABWIDTH |
TYPE_MAPPING |
__all__ |
_commentsub |
_hashsub |
_modules |
_py_getnext |
_rb_getnext |
Attribute | Class to represent a Python function or method. |
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. |
VisibilityBase | Class implementing the visibility aspect of all objects. |
_indent | Protected function to determine the indent width of a whitespace string. |
find_module | Module function to extend the Python module finding mechanism. |
getTypeFromTypeName | Module function to determine the module type given the module type name. |
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 function or method.
None |
None |
Attribute | Constructor |
addAssignment | Public method to add another assignment line number. |
None |
Constructor
Public method to add another assignment line number.
Class to represent a Python class.
None |
None |
Class | Constructor |
addAttribute | Public method to add information about attributes. |
addDescription | Public method to store the class docstring. |
addGlobal | Public method to add information about global (class) variables. |
addMethod | Public method to add information about a method. |
getAttribute | Public method to retrieve an attribute by name. |
getMethod | Public method to retrieve a method by name. |
setEndLine | Public method to record the number of the last line of a class. |
None |
Constructor
Public method to add information about attributes.
Public method to store the class docstring.
Public method to add information about global (class) variables.
Public method to add information about a method.
Public method to retrieve an attribute by name.
Public method to retrieve a method by name.
Public method to record the number of the last line of a class.
Class to represent a Python function or method.
Class |
General |
Static |
None |
Function | Constructor |
addDescription | Public method to store the functions docstring. |
setEndLine | Public method to record the number of the last line of a class. |
None |
Constructor
Public method to store the functions docstring.
Public method to record the number of the last line of a class.
Class to represent a Python module.
None |
None |
Module | Constructor |
__py_scan | Private method to scan the source text of a Python module and retrieve the relevant information. |
__py_setVisibility | Private method to set the visibility of an object. |
__rb_scan | Private method to scan the source text of a Python module and retrieve the relevant information. |
addClass | Public method to add information about a class. |
addDescription | Public method to store the modules docstring. |
addFunction | Public method to add information about a function. |
addGlobal | Public method to add information about global variables. |
addModule | Public 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. |
getType | Public method to get the type of the module's source. |
scan | Public method to scan the source text and retrieve the relevant information. |
None |
Constructor
Private method to scan the source text of a Python module and retrieve the relevant information.
Private method to set the visibility of an object.
Private method to scan the source text of a Python module and retrieve the relevant information.
Public method to add information about a class.
Public method to store the modules docstring.
Public method to add information about a function.
Public method to add information about global variables.
Public 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 get the type of the module's source.
Public method to scan the source text and retrieve the relevant information.
Class to represent a Ruby module.
None |
None |
RbModule | Constructor |
addClass | Public method to add information about a class. |
None |
Constructor
Public method to add information about a class.
Class implementing the visibility aspect of all objects.
None |
None |
isPrivate | Public method to check, if the visibility is Private. |
isProtected | Public method to check, if the visibility is Protected. |
isPublic | Public method to check, if the visibility is Public. |
setPrivate | Public method to set the visibility to Private. |
setProtected | Public method to set the visibility to Protected. |
setPublic | Public method to set the visibility to Public. |
None |
Public method to check, if the visibility is Private.
Public method to check, if the visibility is Protected.
Public method to check, if the visibility is Public.
Public method to set the visibility to Private.
Public method to set the visibility to Protected.
Public method to set the visibility to Public.
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.
Module function to determine the module type given the module type name.
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.