Next / Previous / Contents / Shipman's homepage

6. Module imports
# - - - - -   I m p o r t s

We need the usual sys module for access to the standard streams.
import sys

The module is used to construct the actual XML, and comes from comes from Python XML processing with lxml.
from etbuilder import et, E, subElement

Python's Decimal module handles dimensional arithmetic within the FoDim class. The second line calls this module's getcontext() function to limit the precision of decimal values to six significant digits.
from decimal import Decimal, getcontext
getcontext().prec = 6