Here we import the modules used by this application.
# - - - - - I m p o r t s
sys for access to the command line and
the standard I/O streams. We'll also need the standard
stat modules to look for
directories and files and determine their permissions.
import sys import os import stat
Python's LDAP interface comes from a SourceForge site.
module builds the KWIC index.
module handles generation of TCC pages with the standard
appearance. Because we use this name in lots of places, we'll
shorten it to
import tccpage2 as tp
To work with the
tccpage2 module, we'll use the
XML generation technique described in Python XML processing with
lxml. We'll refer to this
ElementTree implementation as
E is the element factory;
subElement() adds a child node; and
addText() adds text to an existing node.
from etbuilder import et, E, subElement, addText