Next / Previous / Contents / Shipman's homepage

87. spec2004, spec2002, and spec1998

These three scripts are used to search the various species code authority files. For their externals, see the specification.

87.1. spec2004 prologue

The script starts with the usual “pound-bang” line to make it self-executing, and a comment that points back to the documentation.

spec2004
#!/usr/bin/env python
#================================================================
# spec2004:  Look up species code in the MAPS 2004 authority file.
# For documentation, see:
#   http://www.nmt.edu/~shipman/z/ibp/doc/iband7/ims/
#----------------------------------------------------------------

Next, imports: we'll need sys for the usual Python functions; re, the Python regular expression module; plus the base classes for this application.

spec2004
#================================================================
# Imports
#----------------------------------------------------------------

import sys
import re
from baseclasses import *