Next / Previous / Contents / Shipman's homepage

4. baseclasses.py: Prologue

The base classes, along with some utility functions, live in file baseclasses.py. We start our literate exposition of the code with these lines that form a Python module documentation string at the beginning of the file.

baseclasses.py
'''baseclasses.py:  Base classes for IBP banding data entry system.

  Do not edit this file directly.  It is extracted mechanically
  from the specification:
      http://www.nmt.edu/~shipman/z/ibp/doc/iband7/ims/
'''

This module uses two of the author's standard library modules:

Sources and documentation for these modules are available at Logging, scanning, and singleton objects for Python: logscan.py and singleton.py.

Here are the imports for the baseclasses.py file. Because we use Python generators, the first import is necessary to enable generators.

baseclasses.py
#================================================================
# Imports
#----------------------------------------------------------------
from __future__ import generators

We'll also need some standard modules: the Python string and regular expression matching modules.

baseclasses.py
import string
import re

Next, import everything from log.py and scan.py library routines.

baseclasses.py
from log import *
from scan import *