Applied glob expansion of targets to all OSs.
1 parent 3718d7d commit b8a3a89e843cacaafadde264c099aab93a3687e0
@tundra tundra authored on 19 Mar 2010
Showing 1 changed file
View
26
tren.py
 
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: