This module uses the techniques of XML generation described
in Python XML processing with lxml.
Here's the general procedure for generating a TCC-like web page:
Import the tccpage2.py module as:
import tccpage2 as tp
Create a TCCPage instance and
supply it with the desired navigational links. For the
constructor and other interfaces to the tccpage2.py class,
see Section 8, “class TCCPage: The page instance
interface”.
If the title is not a simple string—for example, if
it contains markup such as filename or code tags—the
content can be added to the .headTitle and/or .bodyTitle elements.
Add the page's content to the .content attribute.
Use the .write() method to
send the finished page to its destination.
Note that this module is intended for CGI scripting as
well as for the generation of static pages. For a CGI
script, simply send the output to the standard output
stream, sys.stdout.