| |
---|
| | |
---|
| | # Program Information |
---|
| | |
---|
| | PROGNAME = "tconfpy" |
---|
| | RCSID = "$Id: tconfpy.py,v 1.109 2004/03/12 10:14:02 tundra Exp $" |
---|
| | RCSID = "$Id: tconfpy.py,v 1.110 2004/03/13 00:19:04 tundra Exp $" |
---|
| | VERSION = RCSID.split()[2] |
---|
| | |
---|
| | # Copyright Information |
---|
| | |
---|
| |
---|
| | # Debug Messages |
---|
| | ########## |
---|
| | |
---|
| | dDEBUG = "DEBUG" |
---|
| | dLINEIGNORE = FILENUM + " Line Ignored/Not Included" + PTR + "%s\n" |
---|
| | |
---|
| | dBLANKLINE = "(Parsed To Blank Line - Ignored)" |
---|
| | dLINEIGNORE = FILENUM + " Line Ignored/Not Included" + PTR + "'%s'\n" |
---|
| | dNUMLINES = "Processing File '%s' Resulted In %d Total Lines Parsed" |
---|
| | dPARSEDLINE = FILENUM + " %s" + PTR + "%s\n" |
---|
| | dPARSEDLINE = FILENUM + " '%s'" + PTR + "'%s'\n" |
---|
| | |
---|
| | ########### |
---|
| | # Error Messages |
---|
| | ########### |
---|
| | |
---|
| | eERROR = "ERROR" |
---|
| | |
---|
| | eCONFOPEN = "Cannot Open The File '%s'" |
---|
| | eENDIFEXTRA = FILENUM + " " + ENDIF + " Without Matching Condition" |
---|
| | eERROR = "ERROR" |
---|
| | |
---|
| | |
---|
| | ########### |
---|
| | # Prompts |
---|
| |
---|
| | ########### |
---|
| | # Warning Messages |
---|
| | ########### |
---|
| | |
---|
| | wWARNING = "WARNING" |
---|
| | |
---|
| | wENDIFBAD = FILENUM + " Text After " + ENDIF + " Ignored" |
---|
| | wWARNING = "WARNING" |
---|
| | |
---|
| | |
---|
| | #--------------------------- Code Begins Here ---------------------------------# |
---|
| | |
---|
| |
---|
| | ##### |
---|
| | |
---|
| | if not CondStack[-1]: |
---|
| | if DEBUG: |
---|
| | DebugMsg(dLINEIGNORE %(cfgfile, linenum, orig)) |
---|
| | DebugMsg(dLINEIGNORE % (cfgfile, linenum, orig)) |
---|
| | return |
---|
| | |
---|
| | ##### |
---|
| | # .include Processing |
---|
| |
---|
| | else: |
---|
| | for ref in Reserved.keys(): |
---|
| | line = line.replace("%s%s%s" % (DELIML, ref, DELIMR), Reserved[ref]) |
---|
| | |
---|
| | |
---|
| | |
---|
| | ########## |
---|
| | # End Of Line Parser |
---|
| | ########## |
---|
| | |
---|
| | if DEBUG: |
---|
| | |
---|
| | # Note blank lines for debug purposes |
---|
| | if not line: |
---|
| | line = dBLANKLINE |
---|
| | |
---|
| | DebugMsg(dPARSEDLINE %(cfgfile, linenum, orig, line)) |
---|
| | |
---|
| | # End of 'ParseLine' |
---|
| | |
---|
| | |