| |
---|
| | |
---|
| | PROGNAME = "tren.py" |
---|
| | BASENAME = PROGNAME.split(".py")[0] |
---|
| | PROGENV = BASENAME.upper() |
---|
| | RCSID = "$Id: tren.py,v 1.148 2010/02/05 21:22:44 tundra Exp $" |
---|
| | RCSID = "$Id: tren.py,v 1.149 2010/02/05 21:25:31 tundra Exp $" |
---|
| | VERSION = RCSID.split()[2] |
---|
| | |
---|
| | # Copyright Information |
---|
| | |
---|
| |
---|
| | " -R rensep Separator string for -r rename arguments (Default: %s)" % DEFSEP, |
---|
| | " -r old=new Replace old with new in file or directory names", |
---|
| | " -S suffix Suffix to use when renaming existing filenames (Default: %s)" % DEFSUFFIX, |
---|
| | " -t Test mode, don't rename, just show what the program *would* do", |
---|
| | " -v Print detailed program version information and exit", |
---|
| | " -v Print detailed program version information and continue", |
---|
| | " -w Line length of diagnostic and error output (Default: %s)" % DEFLEN, |
---|
| | " -X Treat the renaming strings literally (Default)", |
---|
| | " -x Treat the old replacement string as a Python regular expression", |
---|
| | ] |
---|
| |
---|
| | ProgramOptions[TESTMODE] = True |
---|
| | |
---|
| | if opt == "-v": |
---|
| | PrintStdout(RCSID) |
---|
| | sys.exit(0) |
---|
| | |
---|
| | if opt == "-w": |
---|
| | try: |
---|
| | l = int(val) |
---|
| |
---|
| | |