formatter
8081
Comment:
|
8815
|
Deletions are marked like this. | Additions are marked like this. |
Line 1: | Line 1: |
||<tablestyle="float:right; font-size: 0.9em; background:#F1F1ED;margin: 0 0 1em 1em;" style="padding:2.0em;"><<TableOfContents(3)>>||= formatter = | ||<tablestyle="float:right; font-size: 0.9em; background:#F1F1ED;margin: 0 0 1em 1em;" style="padding:2.0em;"><<TableOfContents(3)>>|| = formatter = |
Line 3: | Line 6: |
``23 Mar - using the new analyser module`` | ``23 Mar - using the new analyser module`` |
Line 5: | Line 10: |
</div 21> <!-- end of function Section --> | |
Line 7: | Line 12: |
Line 8: | Line 14: |
''''formatter''.'''formatterError'''(```` msg````)'' ''Derived From :'' BaseException</div 24><!--End of name--> </div 25><!-- End of anchor --> |
=== formatterError Class === ||<style="border:none;"><(> ''Italics'' ||<)> '''bold'''|| ||<(> ''`formatter`''.'''`formatterError`'''(```` msg````) ||<)> ''Derived From :'' BaseException || |
Line 13: | Line 23: |
''formatterError''.'''args''' Read Only ''formatterError''.'''message''' Read Only |
''`formatterError`''.'''`args`''' Read Only ''`formatterError`''.'''`message`''' Read Only |
Line 16: | Line 29: |
''''formatter''.'''InvalidDictionaryError'''(```` msg````)'' ''Derived From :'' [[#formatterError|formatterError]]</div 24><!--End of name--> </div 25><!-- End of anchor --> |
=== InvalidDictionaryError Class === ||<(> ''`formatter`''.'''`InvalidDictionaryError`'''(```` msg````) ||<)> ''Derived From :'' [[#formatterError|formatterError]] || |
Line 21: | Line 36: |
''InvalidDictionaryError''.'''args''' Read Only ''InvalidDictionaryError''.'''message''' Read Only |
''`InvalidDictionaryError`''.'''`args`''' Read Only ''`InvalidDictionaryError`''.'''`message`''' Read Only |
Line 24: | Line 42: |
''''formatter''.'''DataWalker'''(```` options=None````)'' </div 24><!--End of name--> </div 25><!-- End of anchor --> ==== Methods ==== ''DataWalker''.'''TraverseProperty'''(`` prop, depth=1, line=False, method=False``) ''DataWalker''.'''TraverseFunction'''(`` func, depth=1, line=False, method=False``) ''DataWalker''.'''TraverseClass'''(`` cls, depth=1``) ''DataWalker''.'''TraverseModule'''(`` depth=1``) |
=== DataWalker Class === ||<(> ''`formatter`''.'''`DataWalker`'''(```` options=None````) ||<)> || ''Base class to walk the various entries in the data for a single module'' ``This is subclassed by Formatter classes`` ==== Methods ==== ''`DataWalker`''.'''`TraverseProperty`'''(`` prop, depth=1, line=False, method=False``) ''`DataWalker`''.'''`TraverseFunction`'''(`` func, depth=1, line=False, method=False``) ''`DataWalker`''.'''`TraverseClass`'''(`` cls, depth=1``) ''`DataWalker`''.'''`TraverseModule`'''(`` depth=1``) |
Line 33: | Line 62: |
''''formatter''.'''HtmlFormatter'''(```` module='', directory='', error='', options=None, autoclose=True, OutputStream=<open file '<stdout>', mode 'w' at 0xb72ae078>````)'' ''Derived From :'' [[#DataWalker|DataWalker]]</div 24><!--End of name--> </div 25><!-- End of anchor --> ``OutputStream : Must be a fileType object - for instance an open file or a StringIO module : the absolute filename of the module to be displayed directory : the absolute path of the directory to be displayed error : A dictionary with details of the error to be displayed options : The options namescpace created from parse-arg autoclose : Whether the formatter should automatically close the file when finished. Where the OutputStream is StringIO this will probably need to be false.`` ==== Methods ==== ''HtmlFormatter''.'''TraverseProperty'''(`` prop, depth=1, line=False, method=False``) ''HtmlFormatter''.'''TraverseFunction'''(`` func, depth=1, line=False, method=False``) ''HtmlFormatter''.'''TraverseClass'''(`` cls, depth=1``) ''HtmlFormatter''.'''TraverseModule'''(`` depth=1``) ''HtmlFormatter''.'''Directory'''(````) ''HtmlFormatter''.'''ErrorReport'''(`` dict``) ''HtmlFormatter''.'''ModuleError'''(`` module``) ''HtmlFormatter''.'''ModuleHeader'''(`` module``) ''HtmlFormatter''.'''ModuleFooter'''(`` module``) ''HtmlFormatter''.'''ClassMethodHeader'''(````) ''HtmlFormatter''.'''ClassMethodFooter'''(````) ''HtmlFormatter''.'''ClassSectionHeader'''(`` depth``) ''HtmlFormatter''.'''NoClassesPresent'''(`` depth=1``) ''HtmlFormatter''.'''ClassSectionFooter'''(`` depth``) ''HtmlFormatter''.'''FunctionSectionHeader'''(`` depth``) ''HtmlFormatter''.'''NoFunctionsPresent'''(`` depth=1``) ''HtmlFormatter''.'''FunctionSectionFooter'''(`` depth``) ''HtmlFormatter''.'''ClassHeader'''(`` cls``) ''HtmlFormatter''.'''ClassFooter'''(`` cls``) ''HtmlFormatter''.'''formatModule'''(`` module, depth=1``) ''HtmlFormatter''.'''formatClass'''(`` cls, depth``) ''HtmlFormatter''.'''ClassPropertiesHeader'''(````) ''HtmlFormatter''.'''ClassPropertiesFooter'''(````) ''HtmlFormatter''.'''formatProperty'''(`` property, depth``) ''HtmlFormatter''.'''formatFunction'''(`` function, depth, line=False, method=False``) |
=== HtmlFormatter Class === ||<(> ''`formatter`''.'''`HtmlFormatter`'''(```` module=`''`, directory=`''`, error=`''`, options=None, autoclose=True, OutputStream='stdout'````) ||<)> ''Derived From :'' [[#DataWalker|DataWalker]] || ''Format the data as a html page'' ``OutputStream : Must be a fileType object - for instance an open file or a StringIO<<BR>>module : the absolute filename of the module to be displayed<<BR>>directory : the absolute path of the directory to be displayed<<BR>>error : A dictionary with details of the error to be displayed<<BR>>options : The options namescpace created from parse-arg<<BR>>autoclose : Whether the formatter should automatically close the file when finished.<<BR>> Where the OutputStream is StringIO this will probably need to be false.`` ==== Methods ==== ''`HtmlFormatter`''.'''`TraverseProperty`'''(`` prop, depth=1, line=False, method=False``) ''`HtmlFormatter`''.'''`TraverseFunction`'''(`` func, depth=1, line=False, method=False``) ''`HtmlFormatter`''.'''`TraverseClass`'''(`` cls, depth=1``) ''`HtmlFormatter`''.'''`TraverseModule`'''(`` depth=1``) ''`HtmlFormatter`''.'''`Directory`'''(````) ''`HtmlFormatter`''.'''`ErrorReport`'''(`` dict``) ''`HtmlFormatter`''.'''`ModuleError`'''(`` module``) ''`HtmlFormatter`''.'''`ModuleHeader`'''(`` module``) ''`HtmlFormatter`''.'''`ModuleFooter`'''(`` module``) ''`HtmlFormatter`''.'''`ClassMethodHeader`'''(````) ''`HtmlFormatter`''.'''`ClassMethodFooter`'''(````) ''`HtmlFormatter`''.'''`ClassSectionHeader`'''(`` depth``) ''`HtmlFormatter`''.'''`NoClassesPresent`'''(`` depth=1``) ''`HtmlFormatter`''.'''`ClassSectionFooter`'''(`` depth``) ''`HtmlFormatter`''.'''`FunctionSectionHeader`'''(`` depth``) ''`HtmlFormatter`''.'''`NoFunctionsPresent`'''(`` depth=1``) ''`HtmlFormatter`''.'''`FunctionSectionFooter`'''(`` depth``) ''`HtmlFormatter`''.'''`ClassHeader`'''(`` cls``) ''`HtmlFormatter`''.'''`ClassFooter`'''(`` cls``) ''`HtmlFormatter`''.'''`formatModule`'''(`` module, depth=1``) ''`HtmlFormatter`''.'''`formatClass`'''(`` cls, depth``) ''`HtmlFormatter`''.'''`ClassPropertiesHeader`'''(````) ''`HtmlFormatter`''.'''`ClassPropertiesFooter`'''(````) ''`HtmlFormatter`''.'''`formatProperty`'''(`` property, depth``) ''`HtmlFormatter`''.'''`formatFunction`'''(`` function, depth, line=False, method=False``) |
Line 71: | Line 125: |
''''formatter''.'''TextFormatter'''(```` absfilename, options=None````)'' ''Derived From :'' [[#DataWalker|DataWalker]]</div 24><!--End of name--> </div 25><!-- End of anchor --> ``absfile - the file name for the module options : opttions passed by the command line`` ==== Methods ==== ''TextFormatter''.'''TraverseProperty'''(`` prop, depth=1, line=False, method=False``) ''TextFormatter''.'''TraverseFunction'''(`` func, depth=1, line=False, method=False``) ''TextFormatter''.'''TraverseClass'''(`` cls, depth=1``) ''TextFormatter''.'''TraverseModule'''(`` depth=1``) ''TextFormatter''.'''ModuleHeader'''(`` module``) <p class='synopsis'>Any header before the module starts</p> ''TextFormatter''.'''ModuleFooter'''(`` module``) <p class='synopsis'>Processing once the end of the Module is reached.</p> ''TextFormatter''.'''ClassHeader'''(`` dict``) ''TextFormatter''.'''ClassFooter'''(`` dict``) ''TextFormatter''.'''NoClassesPresent'''(````) ''TextFormatter''.'''NoFunctionsPresent'''(````) ''TextFormatter''.'''ClassSectionHeader'''(`` depth``) ''TextFormatter''.'''FunctionSectionHeader'''(`` depth``) ''TextFormatter''.'''FunctionSectionFooter'''(`` depth``) ''TextFormatter''.'''formatModule'''(`` module, depth=1``) ''TextFormatter''.'''formatClass'''(`` cls, depth``) ''TextFormatter''.'''formatFunction'''(`` function, depth, line=False, method=False``) |
=== TextFormatter Class === ||<(> ''`formatter`''.'''`TextFormatter`'''(```` absfilename, options=None````) ||<)> ''Derived From :'' [[#DataWalker|DataWalker]] || ''Generates Text format for a single module'' ``absfile - the file name for the module <<BR>>options : opttions passed by the command line`` ==== Methods ==== ''`TextFormatter`''.'''`TraverseProperty`'''(`` prop, depth=1, line=False, method=False``) ''`TextFormatter`''.'''`TraverseFunction`'''(`` func, depth=1, line=False, method=False``) ''`TextFormatter`''.'''`TraverseClass`'''(`` cls, depth=1``) ''`TextFormatter`''.'''`TraverseModule`'''(`` depth=1``) ''`TextFormatter`''.'''`ModuleHeader`'''(`` module``) Any header before the module starts ''`TextFormatter`''.'''`ModuleFooter`'''(`` module``) Processing once the end of the Module is reached. ''`TextFormatter`''.'''`ClassHeader`'''(`` dict``) ''`TextFormatter`''.'''`ClassFooter`'''(`` dict``) ''`TextFormatter`''.'''`NoClassesPresent`'''(````) ''`TextFormatter`''.'''`NoFunctionsPresent`'''(````) ''`TextFormatter`''.'''`ClassSectionHeader`'''(`` depth``) ''`TextFormatter`''.'''`FunctionSectionHeader`'''(`` depth``) ''`TextFormatter`''.'''`FunctionSectionFooter`'''(`` depth``) ''`TextFormatter`''.'''`formatModule`'''(`` module, depth=1``) ''`TextFormatter`''.'''`formatClass`'''(`` cls, depth``) ''`TextFormatter`''.'''`formatFunction`'''(`` function, depth, line=False, method=False``) |
Line 97: | Line 174: |
''''formatter''.'''WikiFormatter'''(```` module='', directory='', error='', options=None, autoclose=True, OutputStream=<open file '<stdout>', mode 'w' at 0xb72ae078>````)'' ''Derived From :'' [[#DataWalker|DataWalker]]</div 24><!--End of name--> </div 25><!-- End of anchor --> ``OutputStream : Must be a fileType object - for instance an open file or a StringIO module : the absolute filename of the module to be displayed directory : the absolute path of the directory to be displayed error : A dictionary with details of the error to be displayed options : The options namescpace created from parse-arg autoclose : Whether the formatter should automatically close the file when finished. Where the OutputStream is StringIO this will probably need to be false. Currently - does not need to support the directoy or error formats - may support directory/Package in future.`` ==== Methods ==== ''WikiFormatter''.'''TraverseProperty'''(`` prop, depth=1, line=False, method=False``) ''WikiFormatter''.'''TraverseFunction'''(`` func, depth=1, line=False, method=False``) ''WikiFormatter''.'''TraverseClass'''(`` cls, depth=1``) ''WikiFormatter''.'''TraverseModule'''(`` depth=1``) ''WikiFormatter''.'''Directory'''(````) <p class='synopsis'>Not supported by a wiki page as yet</p> ''WikiFormatter''.'''ErrorReport'''(`` dict``) <p class='synopsis'>Definitely not needed by a wiki</p> ''WikiFormatter''.'''ModuleError'''(`` module``) <p class='synopsis'>Not needed by a wiki</p> ''WikiFormatter''.'''ModuleHeader'''(`` module``) ''WikiFormatter''.'''ModuleFooter'''(`` module``) ''WikiFormatter''.'''ClassMethodHeader'''(````) ''WikiFormatter''.'''ClassSectionHeader'''(`` depth``) ''WikiFormatter''.'''NoClassesPresent'''(`` depth=1``) ''WikiFormatter''.'''FunctionSectionHeader'''(`` depth``) ''WikiFormatter''.'''NoFunctionsPresent'''(`` depth=1``) ''WikiFormatter''.'''FunctionSectionFooter'''(`` depth``) ''WikiFormatter''.'''ClassHeader'''(`` cls``) ''WikiFormatter''.'''ClassFooter'''(`` cls``) ''WikiFormatter''.'''formatModule'''(`` module, depth=1``) ''WikiFormatter''.'''formatClass'''(`` cls, depth``) ''WikiFormatter''.'''ClassPropertiesHeader'''(````) ''WikiFormatter''.'''formatProperty'''(`` property, depth``) ''WikiFormatter''.'''formatFunction'''(`` function, depth, line=False, method=False``) |
=== WikiFormatter Class === ||<(> ''`formatter`''.'''`WikiFormatter`'''(```` module=`''`, directory=`''`, error=`''`, options=None, autoclose=True, OutputStream='stdout'````) ||<)> ''Derived From :'' [[#DataWalker|DataWalker]] || ''Format the data as a html page'' ``OutputStream : Must be a fileType object - for instance an open file or a StringIO<<BR>>module : the absolute filename of the module to be displayed<<BR>>directory : the absolute path of the directory to be displayed<<BR>>error : A dictionary with details of the error to be displayed<<BR>>options : The options namescpace created from parse-arg<<BR>>autoclose : Whether the formatter should automatically close the file when finished.<<BR>> Where the OutputStream is StringIO this will probably need to be false.<<BR>> <<BR>>Currently - does not need to support the directoy or error formats - may support directory/Package in future.`` ==== Methods ==== ''`WikiFormatter`''.'''`TraverseProperty`'''(`` prop, depth=1, line=False, method=False``) ''`WikiFormatter`''.'''`TraverseFunction`'''(`` func, depth=1, line=False, method=False``) ''`WikiFormatter`''.'''`TraverseClass`'''(`` cls, depth=1``) ''`WikiFormatter`''.'''`TraverseModule`'''(`` depth=1``) ''`WikiFormatter`''.'''`Directory`'''(````) Not supported by a wiki page as yet ''`WikiFormatter`''.'''`ErrorReport`'''(`` dict``) Definitely not needed by a wiki ''`WikiFormatter`''.'''`ModuleError`'''(`` module``) Not needed by a wiki ''`WikiFormatter`''.'''`ModuleHeader`'''(`` module``) ''`WikiFormatter`''.'''`ModuleFooter`'''(`` module``) ''`WikiFormatter`''.'''`ClassMethodHeader`'''(````) ''`WikiFormatter`''.'''`ClassSectionHeader`'''(`` depth``) ''`WikiFormatter`''.'''`NoClassesPresent`'''(`` depth=1``) ''`WikiFormatter`''.'''`FunctionSectionHeader`'''(`` depth``) ''`WikiFormatter`''.'''`NoFunctionsPresent`'''(`` depth=1``) ''`WikiFormatter`''.'''`FunctionSectionFooter`'''(`` depth``) ''`WikiFormatter`''.'''`ClassHeader`'''(`` cls``) ''`WikiFormatter`''.'''`ClassFooter`'''(`` cls``) ''`WikiFormatter`''.'''`formatModule`'''(`` module, depth=1``) ''`WikiFormatter`''.'''`formatClass`'''(`` cls, depth``) ''`WikiFormatter`''.'''`ClassPropertiesHeader`'''(````) ''`WikiFormatter`''.'''`formatProperty`'''(`` property, depth``) ''`WikiFormatter`''.'''`formatFunction`'''(`` function, depth, line=False, method=False``) |
Line 137: | Line 237: |
''''formatter''.'''pager'''(````````)'' </div 24><!--End of name--> </div 25><!-- End of anchor --> ==== Methods ==== ''pager''.'''page'''(`` text``) <p class='synopsis'>Passes the text to the appropriate pager</p> ``The first time this is called, determine what kind of pager to use.`` ''pager''.'''bold'''(`` text``) <p class='synopsis'>Format a string in bold by overstriking.</p> |
=== pager Class === ||<(> ''`formatter`''.'''`pager`'''(````````) ||<)> || ''pager class Encapsulates all the good stuff we need in a pager - Used by the Text formatter class only'' ==== Methods ==== ''`pager`''.'''`page`'''(`` text``) Passes the text to the appropriate pager ``The first time this is called, determine what kind of pager to use.`` ''`pager`''.'''`bold`'''(`` text``) Format a string in bold by overstriking. |
formatter
Formatter module supporting pydoc2 - contains classes for walking the data structures, and generating output as appropriate
23 Mar - using the new analyser module
No functions defined within this module
CLASSES
formatterError Class
<(> Italics |
bold |
||<(> formatter.formatterError( msg) ||<)> Derived From : BaseException ||
Properties
formatterError.args Read Only
formatterError.message Read Only
InvalidDictionaryError Class
||<(> formatter.InvalidDictionaryError( msg) ||<)> Derived From : formatterError ||
Properties
InvalidDictionaryError.args Read Only
InvalidDictionaryError.message Read Only
DataWalker Class
formatter.DataWalker( options=None) |
|
Base class to walk the various entries in the data for a single module
This is subclassed by Formatter classes
Methods
DataWalker.TraverseProperty( prop, depth=1, line=False, method=False)
DataWalker.TraverseFunction( func, depth=1, line=False, method=False)
DataWalker.TraverseClass( cls, depth=1)
DataWalker.TraverseModule( depth=1)
HtmlFormatter Class
||<(> formatter.HtmlFormatter( module='', directory='', error='', options=None, autoclose=True, OutputStream='stdout') ||<)> Derived From : DataWalker ||
Format the data as a html page
OutputStream : Must be a fileType object - for instance an open file or a StringIO
module : the absolute filename of the module to be displayed
directory : the absolute path of the directory to be displayed
error : A dictionary with details of the error to be displayed
options : The options namescpace created from parse-arg
autoclose : Whether the formatter should automatically close the file when finished.
Where the OutputStream is StringIO this will probably need to be false.
Methods
HtmlFormatter.TraverseProperty( prop, depth=1, line=False, method=False)
HtmlFormatter.TraverseFunction( func, depth=1, line=False, method=False)
HtmlFormatter.TraverseClass( cls, depth=1)
HtmlFormatter.TraverseModule( depth=1)
HtmlFormatter.Directory()
HtmlFormatter.ErrorReport( dict)
HtmlFormatter.ModuleError( module)
HtmlFormatter.ModuleHeader( module)
HtmlFormatter.ModuleFooter( module)
HtmlFormatter.ClassMethodHeader()
HtmlFormatter.ClassMethodFooter()
HtmlFormatter.ClassSectionHeader( depth)
HtmlFormatter.NoClassesPresent( depth=1)
HtmlFormatter.ClassSectionFooter( depth)
HtmlFormatter.FunctionSectionHeader( depth)
HtmlFormatter.NoFunctionsPresent( depth=1)
HtmlFormatter.FunctionSectionFooter( depth)
HtmlFormatter.ClassHeader( cls)
HtmlFormatter.ClassFooter( cls)
HtmlFormatter.formatModule( module, depth=1)
HtmlFormatter.formatClass( cls, depth)
HtmlFormatter.ClassPropertiesHeader()
HtmlFormatter.ClassPropertiesFooter()
HtmlFormatter.formatProperty( property, depth)
HtmlFormatter.formatFunction( function, depth, line=False, method=False)
TextFormatter Class
||<(> formatter.TextFormatter( absfilename, options=None) ||<)> Derived From : DataWalker ||
Generates Text format for a single module
absfile - the file name for the module
options : opttions passed by the command line
Methods
TextFormatter.TraverseProperty( prop, depth=1, line=False, method=False)
TextFormatter.TraverseFunction( func, depth=1, line=False, method=False)
TextFormatter.TraverseClass( cls, depth=1)
TextFormatter.TraverseModule( depth=1)
TextFormatter.ModuleHeader( module)
Any header before the module starts
TextFormatter.ModuleFooter( module)
Processing once the end of the Module is reached.
TextFormatter.ClassHeader( dict)
TextFormatter.ClassFooter( dict)
TextFormatter.NoClassesPresent()
TextFormatter.NoFunctionsPresent()
TextFormatter.ClassSectionHeader( depth)
TextFormatter.FunctionSectionHeader( depth)
TextFormatter.FunctionSectionFooter( depth)
TextFormatter.formatModule( module, depth=1)
TextFormatter.formatClass( cls, depth)
TextFormatter.formatFunction( function, depth, line=False, method=False)
WikiFormatter Class
||<(> formatter.WikiFormatter( module='', directory='', error='', options=None, autoclose=True, OutputStream='stdout') ||<)> Derived From : DataWalker ||
Format the data as a html page
OutputStream : Must be a fileType object - for instance an open file or a StringIO
module : the absolute filename of the module to be displayed
directory : the absolute path of the directory to be displayed
error : A dictionary with details of the error to be displayed
options : The options namescpace created from parse-arg
autoclose : Whether the formatter should automatically close the file when finished.
Where the OutputStream is StringIO this will probably need to be false.
Currently - does not need to support the directoy or error formats - may support directory/Package in future.
Methods
WikiFormatter.TraverseProperty( prop, depth=1, line=False, method=False)
WikiFormatter.TraverseFunction( func, depth=1, line=False, method=False)
WikiFormatter.TraverseClass( cls, depth=1)
WikiFormatter.TraverseModule( depth=1)
WikiFormatter.Directory()
Not supported by a wiki page as yet
WikiFormatter.ErrorReport( dict)
Definitely not needed by a wiki
WikiFormatter.ModuleError( module)
Not needed by a wiki
WikiFormatter.ModuleHeader( module)
WikiFormatter.ModuleFooter( module)
WikiFormatter.ClassMethodHeader()
WikiFormatter.ClassSectionHeader( depth)
WikiFormatter.NoClassesPresent( depth=1)
WikiFormatter.FunctionSectionHeader( depth)
WikiFormatter.NoFunctionsPresent( depth=1)
WikiFormatter.FunctionSectionFooter( depth)
WikiFormatter.ClassHeader( cls)
WikiFormatter.ClassFooter( cls)
WikiFormatter.formatModule( module, depth=1)
WikiFormatter.formatClass( cls, depth)
WikiFormatter.ClassPropertiesHeader()
WikiFormatter.formatProperty( property, depth)
WikiFormatter.formatFunction( function, depth, line=False, method=False)
pager Class
formatter.pager() |
|
pager class Encapsulates all the good stuff we need in a pager - Used by the Text formatter class only
Methods
pager.page( text)
Passes the text to the appropriate pager
The first time this is called, determine what kind of pager to use.
pager.bold( text)
Format a string in bold by overstriking.
TimeWarp/formatter (last edited 2014-04-06 09:20:33 by host217-42-218-163)