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

5. Imported modules

Next are the module imports. We'll need the sys module for standard streams and the os module for operating system functions. We need math for its ceil() function.

webstats.py
#================================================================
# Imports
#----------------------------------------------------------------
import sys
import os
import math

The datetime module has a full range of clock and calendar functions.

webstats.py
import datetime

The general technique for generating XML is described in Python XML processing with lxml.

webstats.py
from etbuilder import E, et

The tccpage2 module assists in building Web pages that conform to the TCC style.

webstats.py
import tccpage2

The only module specific to this application is pageget.py, which contains all the logic related to processing Apache access logs; see Section 51, “The pageget.py module: Apache log file functions”.

webstats.py
from pageget import *