Home | Trees | Index | Help |
|
---|
Package epydoc :: Module colorize |
|
colorize
defines functions to colorize regular
expressions and doctest blocks.
Function Summary | |
---|---|
string
|
Return the HTML code for a colorized version of a given doctest block. |
string
|
Return the HTML code for a colorized version of the pattern for the given SRE regular expression. |
string
|
Recursively descend the given regexp parse tree to produce the HTML code for a colorized version of the regexp. |
string
|
This helper function is used by colorize_doctestblock to add colorization
to matching expressions. |
Variable Summary | |
---|---|
str |
ANY_TAG : The CSS class for colorizing "." in regular
expressions. |
str |
ASSERT_TAG : The CSS class for colorizing assertions (such as
"(?=abc)" ) in regular expressions. |
str |
AT_TAG : The CSS class for colorizing character locations (such as
"^" ) in regular expressions. |
str |
BRANCH_TAG : The CSS class for colorizing "|" in regular
expressions. |
str |
CATEGORY_TAG : The CSS class for colorizing character categories (such as
r"\d" )) in regular expressions. |
str |
CHOICE_TAG : The CSS class for colorizing character choice expressions (such as
"[abc]" ) in regular expressions. |
str |
ESCAPE_TAG : The CSS class for colorizing escaped characters (such as
r"\(" ) in regular expressions. |
str |
PAREN_TAG : The CSS class for colorizing parenthases in regular expressions. |
str |
PLUS_TAG : The CSS class for colorizing "+" and
"+?" in regular expressions. |
str |
QMRK_TAG : The CSS class for colorizing "?" and
"??" in regular expressions. |
str |
RE_TAG : The CSS class for colorizing regular expressions. |
str |
REF_TAG : The CSS class for colorizing references (such as
r"\1" ) in regular expressions. |
str |
RNG_TAG : The CSS class for colorizing repeat ranges (such as
"a{3,8}" ) in regular expressions. |
str |
STAR_TAG : The CSS class for colorizing "*" and
"*?" in regular expressions. |
SRE_Pattern |
_DOCTEST_RE : The regular expression used by _doctest_sub to colorize doctest
blocks. |
SRE_Pattern |
_PROMPT_RE : The regular expression used to find Python prompts
(">>>" and "...") in doctest blocks. |
Function Details |
---|
_colorize_re(tree, noparen=0)Recursively descend the given regexp parse tree to produce the HTML code for a colorized version of the regexp.
|
_doctest_sub(match)This helper function is used bycolorize_doctestblock to add colorization
to matching expressions. It is called by _DOCTEST_RE.sub
with an expression that matches _DOCTEST_RE .
|
Variable Details |
---|
ANY_TAGThe CSS class for colorizing"." in regular
expressions.
|
ASSERT_TAGThe CSS class for colorizing assertions (such as"(?=abc)" ) in regular expressions.
|
AT_TAGThe CSS class for colorizing character locations (such as"^" ) in regular expressions.
|
BRANCH_TAGThe CSS class for colorizing"|" in regular
expressions.
|
CATEGORY_TAGThe CSS class for colorizing character categories (such asr"\d" )) in regular expressions.
|
CHOICE_TAGThe CSS class for colorizing character choice expressions (such as"[abc]" ) in regular expressions.
|
ESCAPE_TAGThe CSS class for colorizing escaped characters (such asr"\(" ) in regular expressions.
|
PAREN_TAGThe CSS class for colorizing parenthases in regular expressions.
|
PLUS_TAGThe CSS class for colorizing"+" and
"+?" in regular expressions.
|
QMRK_TAGThe CSS class for colorizing"?" and
"??" in regular expressions.
|
RE_TAGThe CSS class for colorizing regular expressions.
|
REF_TAGThe CSS class for colorizing references (such asr"\1" ) in regular expressions.
|
RNG_TAGThe CSS class for colorizing repeat ranges (such as"a{3,8}" ) in regular expressions.
|
STAR_TAGThe CSS class for colorizing"*" and
"*?" in regular expressions.
|
_DOCTEST_REThe regular expression used by_doctest_sub to colorize doctest
blocks.
|
_PROMPT_REThe regular expression used to find Python prompts (">>>" and "...") in doctest blocks.
|
Home | Trees | Index | Help |
|
---|
Generated by Epydoc 2.1 on Sat Mar 20 17:46:18 2004 | http://epydoc.sf.net |