Package lemon :: Package external :: Package epydoc :: Module colorize
[show private | hide private]
[frames | no frames]

Module lemon.external.epydoc.colorize

Functions to produce colorized HTML code for various objects. Currently, colorize defines functions to colorize regular expressions and doctest blocks.
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.

Variable Details

ANY_TAG

The CSS class for colorizing "." in regular expressions.
Type:
str
Value:
're-char'                                                              

ASSERT_TAG

The CSS class for colorizing assertions (such as "(?=abc)") in regular expressions.
Type:
str
Value:
're-group'                                                             

AT_TAG

The CSS class for colorizing character locations (such as "^") in regular expressions.
Type:
str
Value:
're-char'                                                              

BRANCH_TAG

The CSS class for colorizing "|" in regular expressions.
Type:
str
Value:
're-op'                                                                

CATEGORY_TAG

The CSS class for colorizing character categories (such as r"\d")) in regular expressions.
Type:
str
Value:
're-char'                                                              

CHOICE_TAG

The CSS class for colorizing character choice expressions (such as "[abc]") in regular expressions.
Type:
str
Value:
're-group'                                                             

ESCAPE_TAG

The CSS class for colorizing escaped characters (such as r"\(") in regular expressions.
Type:
str
Value:
're-char'                                                              

PAREN_TAG

The CSS class for colorizing parenthases in regular expressions.
Type:
str
Value:
're-group'                                                             

PLUS_TAG

The CSS class for colorizing "+" and "+?" in regular expressions.
Type:
str
Value:
're-op'                                                                

QMRK_TAG

The CSS class for colorizing "?" and "??" in regular expressions.
Type:
str
Value:
're-op'                                                                

RE_TAG

The CSS class for colorizing regular expressions.
Type:
str
Value:
're'                                                                   

REF_TAG

The CSS class for colorizing references (such as r"\1") in regular expressions.
Type:
str
Value:
're-ref'                                                               

RNG_TAG

The CSS class for colorizing repeat ranges (such as "a{3,8}") in regular expressions.
Type:
str
Value:
're-op'                                                                

STAR_TAG

The CSS class for colorizing "*" and "*?" in regular expressions.
Type:
str
Value:
're-op'                                                                

_DOCTEST_RE

The regular expression used by _doctest_sub to colorize doctest blocks.
Type:
SRE_Pattern
Value:
("""("""|.*?((?!").)""&qu\
ot;))|("("|.*?((?!").)"))|('''('''|.*?[^\\']'''))|\
('('|.*?[^\\']'))|(#.*?$)|(\bdel\b)|(\bfrom\b)|(\blambda\b)|(\breturn\\
b)|(\band\b)|(\bor\b)|(\bis\b)|(\bglobal\b)|(\bnot\b)|(\btry\b)|(\bbre\
ak\b)|(\belse\b)|(\bif\b)|(\belif\b)|(\bwhile\b)|(\bclass\b)|(\bexcept\
\b)|(\bimport\b)|(\bpass\b)|(\braise\b)|(\bcontinue\b)|(\bfinally\b)|(\
\bin\b)|(\bprint\b)|(\bdef\b)|(\bfor\b)                                

_PROMPT_RE

The regular expression used to find Python prompts (">>>" and "...") in doctest blocks.
Type:
SRE_Pattern
Value:
(^\s*(>>>|\.\.\.)(\s|$))                                      

Generated by Epydoc 2.0 on Mon Nov 10 15:07:56 2003 http://epydoc.sf.net