Added program version info to DumpState() output.
General DumpState() cleanup.
1 parent 5ce478c commit 05a8de435a3e8a8025c566564116af23299ac93e
@tundra tundra authored on 30 Jan 2010
Showing 1 changed file
View
13
tren.py
# Program Information
 
PROGNAME = "tren.py"
PROGENV = PROGNAME.split(".py")[0].upper()
RCSID = "$Id: tren.py,v 1.124 2010/01/30 18:27:51 tundra Exp $"
RCSID = "$Id: tren.py,v 1.125 2010/01/30 18:43:36 tundra Exp $"
VERSION = RCSID.split()[2]
 
# Copyright Information
 
CPRT = "(c)"
DATE = "2010"
OWNER = "TundraWare Inc."
COPYRIGHT = "Copyright %s %s %s " % (CPRT, DATE, OWNER)
 
PROGVER = PROGNAME + " " + VERSION + (" - %s" % COPYRIGHT)
 
 
#----------------------------------------------------------#
# Variables User Might Change #
#####
# Usage Prompts
#####
 
uTable = [PROGNAME + " " + VERSION + " - %s\n" % COPYRIGHT,
uTable = [PROGVER, "\n",
"usage: " + PROGNAME + " [-1abCcdEefghqtvwXx] [-I file] [-l string] [-r old=new]... file|dir file|dir ...",
" where,",
" -1 Rename only the first instance of the specified string (Default)",
" -a Rename within the entire file or directory name (Default)",
 
def DumpRenameObj(obj):
 
SEPARATOR = SEPCHAR * MAXLINELEN
DebugMsg("\n")
DebugMsg(SEPARATOR)
DebugMsg(dDUMPOBJ % str(obj))
DebugMsg(SEPARATOR)
 
DebugMsg(name)
for item in obj.RenNames[name]:
DebugMsg(ColumnPad([" ", item]))
 
DebugMsg(SEPARATOR + "\n\n")
DebugMsg(SEPARATOR)
 
# End of 'DumpRenameObj()'
 
 
 
def DumpState():
 
SEPARATOR = SEPCHAR * MAXLINELEN
DebugMsg("\n")
DebugMsg(SEPARATOR)
DebugMsg(dCURSTATE)
DebugMsg(SEPARATOR)
 
# Names of all the state variables we want dumped
state = [
"PROGVER",
"DEBUG",
"CASESENSITIVE",
"ERRORCONTINUE",
"EXTDELIM",
 
for k in state:
DebugMsg(ColumnPad([k, eval(k)]))
 
DebugMsg(SEPARATOR + "\n\n")
DebugMsg(SEPARATOR)
 
 
# End of 'DumpState()'