|
|
[show private | hide private] |
doctest
module.
para
blocks:
<!ENTITY % colorized '(code | math | index | italic | bold | uri | link)*'> <!ELEMENT epytext ((para | literalblock | doctestblock | section | ulist | olist)*, fieldlist?)> <!ELEMENT para (#PCDATA | %colorized;)*> <!ELEMENT section (para | listblock | doctestblock | section | ulist | olist)+> <!ELEMENT fieldlist (field+)> <!ELEMENT field (tag, (para | listblock | doctestblock) ulist | olist)+)> <!ELEMENT tag (#PCDATA)> <!ELEMENT literalblock (#PCDATA)> <!ELEMENT doctestblock (#PCDATA)> <!ELEMENT ulist (li+)> <!ELEMENT olist (li+)> <!ELEMENT li (para | literalblock | doctestblock | ulist | olist)+> <!ATTLIST li bullet NMTOKEN #IMPLIED> <!ATTLIST olist start NMTOKEN #IMPLIED> <!ELEMENT uri (name, target)> <!ELEMENT link (name, target)> <!ELEMENT name (#PCDATA | %colorized;)*> <!ELEMENT target (#PCDATA)> <!ELEMENT code (#PCDATA | %colorized;)*> <!ELEMENT math (#PCDATA | %colorized;)*> <!ELEMENT italic (#PCDATA | %colorized;)*> <!ELEMENT bold (#PCDATA | %colorized;)*> <!ELEMENT index (#PCDATA | %colorized;)>
Classes | |
---|---|
Token |
Token s are an intermediate data structure used while constructing the structuring DOM tree for a formatted docstring. |
Exceptions | |
---|---|
ColorizingError |
A warning or error generated while colorizing a paragraph. |
ParseError |
The base class for warnings and errors generated while parsing epytext strings. |
StructuringError |
A warning or error generated while structuring a formatted documentation string. |
TokenizationError |
A warning or error generated while tokenizing a formatted documentation string. |
Function Summary | |
---|---|
xml.dom.minidom.Element
|
parse(str,
errors,
warnings) Return a DOM tree encoding the contents of an epytext string. |
xml.dom.minidom.Element
|
parse_as_literal(str) Return a DOM tree matching the epytext DTD, containing a single literal block. |
xml.dom.minidom.Element
|
pparse(str,
show_warnings,
show_errors) Pretty-parse the string. |
xml.dom.minidom.Element
|
summary(tree) Given a DOM tree representing formatted documentation, return a new DOM tree containing the documentation's first sentence. |
string
|
to_debug(tree,
indent,
seclevel) Convert a DOM tree encoding epytext back to an epytext string, annotated with extra debugging information. |
string
|
to_epytext(tree,
indent,
seclevel) Convert a DOM tree encoding epytext back to an epytext string. |
string
|
to_plaintext(tree,
indent,
seclevel) Convert a DOM tree encoding epytext to a string representation. |
string
|
wordwrap(str,
indent,
right) Word-wrap the given string. |
Variable Summary | |
---|---|
int |
SCRWIDTH
- The default width with which text will be wrapped when formatting the output of the parser. |
Function Details |
---|
parse
errors and warnings parameters.
|
parse_as_literal
|
pparse
|
summary
|
to_debug
to_epytext , but it adds explicit information
about where different blocks begin, along the left margin.
|
to_epytext
parse . I.e., assuming there are no errors,
the following is true:
|
to_plaintext
to_epytext , but to_plaintext removes inline
markup, prints escaped characters in unescaped form, etc.
|
wordwrap
indent spaces, followed by one or more (space-deliniated)
words whose length is less than right-indent . If a word is
longer than right-indent characters, then it is put on its own
line.
|
Variable Details |
---|
SCRWIDTH
|
|
|
Generated by Epydoc on Sun Oct 6 03:32:11 2002 | http://epydoc.sf.net |