| |
---|
| | |
---|
| | # Program Information |
---|
| | |
---|
| | PROGNAME = "tren" |
---|
| | RCSID = "$Id: tren.py,v 1.100 2010/01/14 18:24:02 tundra Exp $" |
---|
| | RCSID = "$Id: tren.py,v 1.101 2010/01/14 22:30:06 tundra Exp $" |
---|
| | VERSION = RCSID.split()[2] |
---|
| | |
---|
| | # Copyright Information |
---|
| | |
---|
| | CPRT = "(c)" |
---|
| | DATE = "2010" |
---|
| | OWNER = "TundraWare Inc." |
---|
| | COPYRIGHT = "Copyright %s %s %s %s. " % (CPRT, DATE, OWNER) |
---|
| | COPYRIGHT = "Copyright %s %s %s " % (CPRT, DATE, OWNER) |
---|
| | |
---|
| | |
---|
| | #----------------------------------------------------------# |
---|
| | # Variables User Might Change # |
---|
| |
---|
| | |
---|
| | import getopt |
---|
| | import os |
---|
| | import sys |
---|
| | import tconfpy |
---|
| | |
---|
| | |
---|
| | #----------------------------------------------------------# |
---|
| | # Aliases & Redefinitions # |
---|
| |
---|
| | sys.exit(1) |
---|
| | |
---|
| | for opt, val in opts: |
---|
| | if opt == "-f": |
---|
| | CFGFILE=val |
---|
| | print val |
---|
| | if opt == "-h": |
---|
| | Usage() |
---|
| | sys.exit(0) |
---|
| | if opt == "-v": |
---|
| | print RCSID |
---|
| | sys.exit(0) |
---|
| | |
---|
| | # Process the configuration file |
---|
| | |
---|
| | retval = tconfpy.ParseConfig(CFGFILE, CallingProgram="%s %s " % (PROGNAME, VERSION)) |
---|
| | |
---|
| | # Print any errors or warning generated by the parse |
---|
| | |
---|
| | for x in (retval.ErrMsgs, retval.WarnMsgs): |
---|
| | for y in x: |
---|
| | print y |
---|
| | |
---|
| | # If there were any errors, we're done |
---|
| | if retval.ErrMsgs: |
---|
| | sys.exit(0) |
---|
| | |
---|
| | |