summaryrefslogtreecommitdiffstats
path: root/Tools/scripts/fixps.py
diff options
context:
space:
mode:
authorAndrew M. Kuchling <amk@amk.ca>2003-05-13 18:14:25 (GMT)
committerAndrew M. Kuchling <amk@amk.ca>2003-05-13 18:14:25 (GMT)
commitac6df95d07aa3951f8bfc6febce132e09850db73 (patch)
tree5bc66133d5d093e099b622ac3cd35e216f60a389 /Tools/scripts/fixps.py
parentbf1bef820c5af6b0a9a60abe1564ac35f036fdcb (diff)
downloadcpython-ac6df95d07aa3951f8bfc6febce132e09850db73.zip
cpython-ac6df95d07aa3951f8bfc6febce132e09850db73.tar.gz
cpython-ac6df95d07aa3951f8bfc6febce132e09850db73.tar.bz2
Fix use of 'file' as a variable name.
(I've tested the fixes, but please proofread anyway.)
Diffstat (limited to 'Tools/scripts/fixps.py')
-rwxr-xr-xTools/scripts/fixps.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/Tools/scripts/fixps.py b/Tools/scripts/fixps.py
index 1e6e114..e406571 100755
--- a/Tools/scripts/fixps.py
+++ b/Tools/scripts/fixps.py
@@ -8,23 +8,23 @@ import re
def main():
- for file in sys.argv[1:]:
+ for filename in sys.argv[1:]:
try:
- f = open(file, 'r')
+ f = open(filename, 'r')
except IOError, msg:
- print file, ': can\'t open :', msg
+ print filename, ': can\'t open :', msg
continue
line = f.readline()
if not re.match('^#! */usr/local/bin/python', line):
- print file, ': not a /usr/local/bin/python script'
+ print filename, ': not a /usr/local/bin/python script'
f.close()
continue
rest = f.read()
f.close()
line = re.sub('/usr/local/bin/python',
'/usr/bin/env python', line)
- print file, ':', `line`
- f = open(file, "w")
+ print filename, ':', `line`
+ f = open(filename, "w")
f.write(line)
f.write(rest)
f.close()