Methods
|
|
|
|
__getitem__
|
__getitem__ ( self, itemName )
Exceptions
|
|
KeyError( 'Unrecognized name: "%s"' % itemName, itemName )
|
|
|
__init__
|
__init__ (
self,
name='',
parent=None,
tree=None,
commentInfo={},
)
Initialize the info extractor.
Parameters:
- name
name of this object
- parent
parent object (e.g. Module for Class)
- tree
parse tree from which to extract information
- commentInfo
comments extracted from source file where
this object was found
|
|
_extractInfo
|
_extractInfo ( self, tree )
Pull information out of the parse tree.
extract docstring
discover inner definitions
pprint.pprint(cstmt)
|
|
_extractSummary
|
_extractSummary ( self, text )
Extract a summary text from a larger body.
|
|
getClassInfo
|
getClassInfo ( self, name )
Return a ClassInfo object for the class by name.
|
|
getClassNames
|
getClassNames ( self )
Return the names of classes defined within the module.
|
|
getDocString
|
getDocString ( self )
Return any __doc__ string value found for the object.
print 'DOC STRING for %s is ' % self._name, dstring
|
|
getFullyQualifiedName
|
getFullyQualifiedName ( self )
Return a complete, unique, name representing this object.
print %s (%s) has a parent % (self.getName(),
self.__class__.__name__)
print parent= , self._parent.getFullyQualifiedName()
|
|
getName
|
getName ( self )
Return the name of the object.
|
|
getQualifiedName
|
getQualifiedName ( self, transTable=string.maketrans( '/', '_' ) )
print getQualifiedName(%s) % self.getName()
name = string.translate(name, transTable)
|
|
getSummary
|
getSummary ( self )
Return a summary of the __doc__ string for this object.
|