This script is run after staticloader
(see Section 7, “The staticloader script: Populate
the static tables”) to convert the MySQL
database to the new form.
#!/usr/bin/env python # transloader: Copy MySQL CBC database to Posgresql # For documentation, see: # http://www.nmt.edu/~shipman/z/cbc/pycbc/
Input is from the mycbc module: see
Section 8.2, “mycbc.py: Interface to the 1998
database”. Output is to the pycbc module; see Section 5, “Using the pycbc interface”.
#================================================================
# Imports
#----------------------------------------------------------------
from timer import Timer
t0 = Timer('Imports')
import sys
import mycbc, pycbc
print t0
The passwords are kept in external files readable only by the author, so the actual passwords don't need to appear here.
#================================================================ # Manifest constants #---------------------------------------------------------------- MY_PASS = "mypass" # MySQL password file PS_PASS = "pspass" # Postgresql password file