Next / Previous / Contents / Shipman's homepage

9. Imported modules

For documentation on these modules, see Section 3, “Overview of the internals”.

The standard Python sys module gives us command line arguments and I/O streams. The os module allows us to crawl around the directory structure, build and dismantle path names, and so forth. The stat module allows access to file modification timestamps. Module re is the standard Python regular expression module. The optparse module parses command line arguments.

noteweb
#================================================================
# Imports
#----------------------------------------------------------------
import sys, os, stat, re, optparse

The Singleton class comes from Scanning objects for Python: Scan and Log.

noteweb
from singleton import Singleton

The birdnotes.py module takes care of reading the XML field notes input files.

noteweb
import birdnotes

Because we'll need to sort records into phylogenetic order, we import the bird taxonomy module.

noteweb
import xnomo3

The lxml.etree module handles generation of XHTML. Because this is used heavily, we abbreviate it as et.

noteweb
import lxml.etree as et

General page structure and navigation is set up by tccpage2.py.

noteweb
import tccpage2