Package epydoc :: Package docwriter :: Module html_colorize
[hide private]
[frames] | no frames]

Module html_colorize

source code

Functions to produce colorized HTML code for various objects. Currently, html_colorize defines functions to colorize Python source code.

Classes [hide private]
  PythonSourceColorizer
A class that renders a python module's source code into HTML pages.
Variables [hide private]
  PYSRC_JAVASCRIPTS = 'function expand(id) {\n var elt = docume...
Javascript code for the PythonSourceColorizer
  PYSRC_EXPANDTO_JAVASCRIPT = '<script type="text/javascript">\n...
  _HDR = '<?xml version="1.0" encoding="ascii"?>\n <!DOCT...
  _FOOT = '</body></html>'
Variables Details [hide private]

PYSRC_JAVASCRIPTS

Javascript code for the PythonSourceColorizer

Value:
'''function expand(id) {
  var elt = document.getElementById(id+"-expanded");
  if (elt) elt.style.display = "block";
  var elt = document.getElementById(id+"-expanded-linenums");
  if (elt) elt.style.display = "block";
  var elt = document.getElementById(id+"-collapsed");
  if (elt) { elt.innerHTML = ""; elt.style.display = "none"; }
  var elt = document.getElementById(id+"-collapsed-linenums");
...

PYSRC_EXPANDTO_JAVASCRIPT

Value:
'''<script type="text/javascript">
<!--
expandto(location.href);
// -->
</script>
'''

_HDR

Value:
'''<?xml version="1.0" encoding="ascii"?>
        <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
                  "DTD/xhtml1-transitional.dtd">
        <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang=\
"en">
        <head>
          <title>$title$</title>
          <link rel="stylesheet" href="epydoc.css" type="text/css" />
...