| |
---|
| | |
---|
| | PROGNAME = "tren.py" |
---|
| | BASENAME = PROGNAME.split(".py")[0] |
---|
| | PROGENV = BASENAME.upper() |
---|
| | RCSID = "$Id: tren.py,v 1.206 2010/03/19 16:25:57 tundra Exp $" |
---|
| | RCSID = "$Id: tren.py,v 1.207 2010/03/19 17:50:22 tundra Exp $" |
---|
| | VERSION = RCSID.split()[2] |
---|
| | |
---|
| | # Copyright Information |
---|
| | |
---|
| |
---|
| | # many of the renaming tokens derive information about the file being |
---|
| | # renamed. |
---|
| | |
---|
| | |
---|
| | # Do wildcard expansion for Windows systems because they have a |
---|
| | # brain-damaged shell. |
---|
| | |
---|
| | if WINDOWS: |
---|
| | |
---|
| | expandedlist = [] |
---|
| | for arg in args: |
---|
| | expandedlist += glob.glob(arg) |
---|
| | |
---|
| | args = expandedlist |
---|
| | |
---|
| | targs = RenameTargets(args) |
---|
| | # Do wildcard expansion on the rename targets because they may |
---|
| | # have come from an include file (where they are not expanded) |
---|
| | # or from a Windows shell that doesn't know how to handle globbing |
---|
| | # properly. |
---|
| | |
---|
| | expandedlist = [] |
---|
| | for arg in args: |
---|
| | expandedlist += glob.glob(arg) |
---|
| | |
---|
| | targs = RenameTargets(expandedlist) |
---|
| | |
---|
| | # Now process the options |
---|
| | |
---|
| | for opt, val in opts: |
---|
| |
---|
| | |