| |
---|
| | # Program Information |
---|
| | |
---|
| | PROGNAME = "tren.py" |
---|
| | PROGENV = PROGNAME.split(".py")[0].upper() |
---|
| | RCSID = "$Id: tren.py,v 1.121 2010/01/29 21:07:17 tundra Exp $" |
---|
| | RCSID = "$Id: tren.py,v 1.122 2010/01/29 21:18:35 tundra Exp $" |
---|
| | VERSION = RCSID.split()[2] |
---|
| | |
---|
| | # Copyright Information |
---|
| | |
---|
| |
---|
| | # End of 'ErrorMsg()' |
---|
| | |
---|
| | |
---|
| | ##### |
---|
| | # Parse Renaming Requests |
---|
| | ##### |
---|
| | |
---|
| | def ParseRenReq(val, filename): |
---|
| | |
---|
| | """ This routine parses a old=new |
---|
| | renaming pair, resolves any |
---|
| | outstanding renaming tokens, |
---|
| | and returns them in the form |
---|
| | of: [old, new] |
---|
| | """ |
---|
| | |
---|
| | return val.split("=") |
---|
| | |
---|
| | # End of 'ParseRenReq()' |
---|
| | |
---|
| | |
---|
| | ##### |
---|
| | # Print To stderr |
---|
| | ##### |
---|
| | |
---|
| | def PrintStderr(msg, trailing="\n"): |
---|
| |
---|
| | |
---|
| | return commandlines |
---|
| | |
---|
| | # End of 'ProcessOptTgtPair()' |
---|
| | |
---|
| | |
---|
| | ##### |
---|
| | # Process Command Line Renaming Requests |
---|
| | ##### |
---|
| | |
---|
| | def ProcessRenReq(val): |
---|
| | |
---|
| | return val.split("=") |
---|
| | |
---|
| | # End of 'ProcessRenReq()' |
---|
| | |
---|
| | |
---|
| | ##### |
---|
| | # Print Usage Information |
---|
| |
---|
| | EXTDELIM = val |
---|
| | if opt == "-q": |
---|
| | QUIET = True |
---|
| | if opt == "-r": |
---|
| | RenRequests.append(ProcessRenReq(val)) |
---|
| | RenRequests.append(val) |
---|
| | if opt == "-t": |
---|
| | TESTMODE = True |
---|
| | if opt == "-v": |
---|
| | PrintStdout(RCSID) |
---|
| |
---|
| | |