Package epydoc :: Package markup :: Module epytext :: Class ParsedEpytextDocstring
[hide private]
[frames] | no frames]

ClassType ParsedEpytextDocstring

source code

Known Subclasses:

Instance Methods [hide private]
 
__init__(self, dom_tree, **options) source code
call graph 
 
__str__(self) source code
string
to_html(self, docstring_linker, directory=None, docindex=None, context=None, **options)
Translate this docstring to HTML.
source code
call graph 
string
to_latex(self, docstring_linker, directory=None, docindex=None, context=None, **options)
Translate this docstring to LaTeX.
source code
string
to_plaintext(self, docstring_linker, **options)
Translate this docstring to plaintext.
source code
call graph 
 
_index_term_key(self, tree) source code
 
_to_html(self, tree, linker, directory, docindex, context, indent=0, seclevel=0) source code
call graph 
 
_build_graph(self, graph_type, graph_args, linker, docindex, context) source code
call graph 
 
_to_latex(self, tree, linker, directory, docindex, context, indent=0, seclevel=0, breakany=0) source code
(ParsedDocstring, bool)
summary(self)
Returns: A pair consisting of a short summary of this docstring and a boolean value indicating whether there is further documentation in addition to the summary.
source code
call graph 
(ParsedDocstring, list of Field)
split_fields(self, errors=None)
Split this docstring into its body and its fields.
source code
call graph 
list of ParsedDocstring
index_terms(self)
Returns: The list of index terms that are defined in this docstring.
source code
call graph 
 
_index_terms(self, tree, terms) source code
call graph 

Inherited from ParsedDocstring: __add__, concatenate

Class Variables [hide private]
  SYMBOL_TO_HTML = {'->': '&rarr;', '<-': '&larr;', '<=': '&le;'...
  SYMBOL_TO_LATEX = {'->': '\\(\\rightarrow\\)', '<-': '\\(\\lef...
  _SUMMARY_RE = re.compile(r'(\s*[\w\W]*?\.)(\s|$)')
Method Details [hide private]

to_html(self, docstring_linker, directory=None, docindex=None, context=None, **options)

source code 
call graph 

Translate this docstring to HTML.

Parameters:
  • docstring_linker - An HTML translator for crossreference links into and out of the docstring.
  • options - Any extra options for the output. Unknown options are ignored.
Returns: string
An HTML fragment that encodes this docstring.
Overrides: ParsedDocstring.to_html
(inherited documentation)

to_latex(self, docstring_linker, directory=None, docindex=None, context=None, **options)

source code 

Translate this docstring to LaTeX.

Parameters:
  • docstring_linker - A LaTeX translator for crossreference links into and out of the docstring.
  • options - Any extra options for the output. Unknown options are ignored.
Returns: string
A LaTeX fragment that encodes this docstring.
Overrides: ParsedDocstring.to_latex
(inherited documentation)

to_plaintext(self, docstring_linker, **options)

source code 
call graph 

Translate this docstring to plaintext.

Parameters:
  • docstring_linker - A plaintext translator for crossreference links into and out of the docstring.
  • options - Any extra options for the output. Unknown options are ignored.
Returns: string
A plaintext fragment that encodes this docstring.
Overrides: ParsedDocstring.to_plaintext
(inherited documentation)

summary(self)

source code 
call graph 
Returns: (ParsedDocstring, bool)
A pair consisting of a short summary of this docstring and a boolean value indicating whether there is further documentation in addition to the summary. Typically, the summary consists of the first sentence of the docstring.
Overrides: ParsedDocstring.summary
(inherited documentation)

split_fields(self, errors=None)

source code 
call graph 

Split this docstring into its body and its fields.

Parameters:
  • errors - A list where any errors generated during splitting will be stored. If no list is specified, then errors will be ignored.
Returns: (ParsedDocstring, list of Field)
A tuple (body, fields), where body is the main body of this docstring, and fields is a list of its fields. If the resulting body is empty, return None for the body.
Overrides: ParsedDocstring.split_fields
(inherited documentation)

index_terms(self)

source code 
call graph 
Returns: list of ParsedDocstring
The list of index terms that are defined in this docstring. Each of these items will be added to the index page of the documentation.
Overrides: ParsedDocstring.index_terms
(inherited documentation)

Class Variable Details [hide private]

SYMBOL_TO_HTML

Value:
{'->': '&rarr;',
 '<-': '&larr;',
 '<=': '&le;',
 '>=': '&ge;',
 'Alpha': '&Alpha;',
 'Beta': '&Beta;',
 'Chi': '&Chi;',
 'Delta': '&Delta;',
...

SYMBOL_TO_LATEX

Value:
{'->': '\\(\\rightarrow\\)',
 '<-': '\\(\\leftarrow\\)',
 '<=': '\\(\\le\\)',
 '>=': '\\(\\ge\\)',
 'Alpha': '\\(\\alpha\\)',
 'Beta': '\\(\\beta\\)',
 'Chi': '\\(\\chi\\)',
 'Delta': '\\(\\Delta\\)',
...