module documentation
Syntax highlighting for blocks of Python code.
Function | colorize |
Colorize a string containing only Python code. This method differs from colorize_doctest in that it will not search for doctest prompts when deciding how to colorize the string. |
Function | colorize |
Undocumented |
Function | colorize |
Perform syntax highlighting on the given doctest string, and return the resulting HTML code. |
Function | colorize |
Undocumented |
Function | subfunc |
Undocumented |
Constant | DEFINE |
Undocumented |
Constant | DOCTEST |
Undocumented |
Constant | DOCTEST |
Undocumented |
Constant | DOCTEST |
Undocumented |
Constant | EXCEPT |
Undocumented |
Constant | PROMPT2 |
Undocumented |
Constant | PROMPT |
Undocumented |
Constant | _BUILTIN |
Undocumented |
Constant | _BUILTINS |
Undocumented |
Constant | _COMMENT |
Undocumented |
Constant | _DEFINE |
Undocumented |
Constant | _KEYWORD |
Undocumented |
Constant | _KEYWORDS |
Undocumented |
Constant | _PROMPT1 |
Undocumented |
Constant | _PROMPT2 |
Undocumented |
Constant | _STRING |
Undocumented |
Colorize a string containing only Python code. This method differs from colorize_doctest
in that it will not search for doctest prompts when deciding how to colorize the string.
This code consists of a <pre> block with class=py-doctest. Syntax highlighting is performed using the following CSS classes:
- py-keyword -- a Python keyword (for, if, etc.)
- py-builtin -- a Python builtin name (abs, dir, etc.)
- py-string -- a string literal
- py-comment -- a comment
- py-except -- an exception traceback (up to the next >>>)
- py-output -- the output from a doctest block.
- py-defname -- the name of a function or class defined by a def or class statement.
Perform syntax highlighting on the given doctest string, and return the resulting HTML code.
This code consists of a <pre> block with class=py-doctest. Syntax highlighting is performed using the following CSS classes:
- py-prompt -- the Python PS1 prompt (>>>)
- py-more -- the Python PS2 prompt (...)
- the CSS classes output by
colorize_codeblock
Undocumented
Value |
|
Undocumented
Value |
|
Undocumented
Value |
|