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.

# Imports
import sys, os, stat, re, optparse

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

from singleton import Singleton

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

import birdnotes

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

import xnomo3

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

import lxml.etree as et

General page structure and navigation is set up by

import tccpage2