Next / Previous / Contents / TCC Help System / NM Tech homepage

2. Overview

This module uses the techniques of XML generation described in Python and the XML Document Object Model (DOM).

Here's the general procedure for generating a TCC-like web page:

  1. Import the tccpage.py module as:

    import tccpage as tp
    

  2. Instantiate a TCCPage object and supply it with the desired navigational links. For the constructor and other interfaces to the tccpage.py class, see Section 6, “class TCCPage: The page object interface”.

  3. If the title is not a simple string—for example, if it contains markup such as filename or userinput tags—the content can be added to the .headTitle and/or .bodyTitle elements.

  4. Add the page's content to the .content attribute.

  5. Use the .write() method to send the finished page to its destination.