summaryrefslogtreecommitdiffstats
path: root/Tools
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1992-01-01 19:35:13 (GMT)
committerGuido van Rossum <guido@python.org>1992-01-01 19:35:13 (GMT)
commitbdfcfccbe591e15221f35add01132174c9b4e669 (patch)
tree7e5f0d52b8c44e623b12e8f4b5cd645c361e5aeb /Tools
parent4d8e859e8f0a209a7e999ce9cc0988156c795949 (diff)
downloadcpython-bdfcfccbe591e15221f35add01132174c9b4e669.zip
cpython-bdfcfccbe591e15221f35add01132174c9b4e669.tar.gz
cpython-bdfcfccbe591e15221f35add01132174c9b4e669.tar.bz2
New == syntax
Diffstat (limited to 'Tools')
-rwxr-xr-xTools/scripts/byteyears.py6
-rwxr-xr-xTools/scripts/checkpyc.py8
-rwxr-xr-xTools/scripts/findlinksto.py2
-rwxr-xr-xTools/scripts/objgraph.py10
-rwxr-xr-xTools/scripts/pdeps.py4
-rwxr-xr-xTools/scripts/ptags.py2
-rwxr-xr-xTools/scripts/suff.py2
-rwxr-xr-xTools/scripts/which.py2
-rwxr-xr-xTools/scripts/xxci.py6
9 files changed, 21 insertions, 21 deletions
diff --git a/Tools/scripts/byteyears.py b/Tools/scripts/byteyears.py
index 06f7559..c0aea70 100755
--- a/Tools/scripts/byteyears.py
+++ b/Tools/scripts/byteyears.py
@@ -17,13 +17,13 @@ except NameError:
statfunc = posix.stat
# Parse options
-if sys.argv[1] = '-m':
+if sys.argv[1] == '-m':
itime = ST_MTIME
del sys.argv[1]
-elif sys.argv[1] = '-c':
+elif sys.argv[1] == '-c':
itime = ST_CTIME
del sys.argv[1]
-elif sys.argv[1] = '-a':
+elif sys.argv[1] == '-a':
itime = ST_CTIME
del sys.argv[1]
else:
diff --git a/Tools/scripts/checkpyc.py b/Tools/scripts/checkpyc.py
index 152fb1d..54396a3 100755
--- a/Tools/scripts/checkpyc.py
+++ b/Tools/scripts/checkpyc.py
@@ -10,9 +10,9 @@ def main():
silent = 0
verbose = 0
if sys.argv[1:]:
- if sys.argv[1] = '-v':
+ if sys.argv[1] == '-v':
verbose = 1
- elif sys.argv[1] = '-s':
+ elif sys.argv[1] == '-s':
silent = 1
MAGIC = '\0\0\0\0'
try:
@@ -32,7 +32,7 @@ def main():
print 'Checking', `dirname`, '...'
names.sort()
for name in names:
- if name[-3:] = '.py':
+ if name[-3:] == '.py':
name = path.join(dirname, name)
try:
st = posix.stat(name)
@@ -55,7 +55,7 @@ def main():
print `name_c`
continue
mtime = get_long(mtime_str)
- if mtime = 0 or mtime = -1:
+ if mtime == 0 or mtime == -1:
print 'Bad ".pyc" file', `name_c`
elif mtime <> st[ST_MTIME]:
print 'Out-of-date ".pyc" file',
diff --git a/Tools/scripts/findlinksto.py b/Tools/scripts/findlinksto.py
index 9398514..a8051c1 100755
--- a/Tools/scripts/findlinksto.py
+++ b/Tools/scripts/findlinksto.py
@@ -17,7 +17,7 @@ def visit(pattern, dirname, names):
name = path.join(dirname, name)
try:
linkto = posix.readlink(name)
- if linkto[:n] = pattern:
+ if linkto[:n] == pattern:
print name, '->', linkto
except posix.error:
pass
diff --git a/Tools/scripts/objgraph.py b/Tools/scripts/objgraph.py
index b45bba2..a21797d 100755
--- a/Tools/scripts/objgraph.py
+++ b/Tools/scripts/objgraph.py
@@ -170,18 +170,18 @@ def main():
return 1
optu = optc = optd = 0
for opt, void in optlist:
- if opt = '-u':
+ if opt == '-u':
optu = 1
- elif opt = '-c':
+ elif opt == '-c':
optc = 1
- elif opt = '-d':
+ elif opt == '-d':
optd = 1
- if optu = optc = optd = 0:
+ if optu == optc == optd == 0:
optu = optc = optd = 1
if not args:
args = ['-']
for file in args:
- if file = '-':
+ if file == '-':
readinput(sys.stdin)
else:
readinput(open(file, 'r'))
diff --git a/Tools/scripts/pdeps.py b/Tools/scripts/pdeps.py
index 2533015..df20894 100755
--- a/Tools/scripts/pdeps.py
+++ b/Tools/scripts/pdeps.py
@@ -67,13 +67,13 @@ m_from = regexp.compile('^[ \t]*import[ \t]+([^#]+)')
def process(filename, table):
fp = open(filename, 'r')
mod = path.basename(filename)
- if mod[-3:] = '.py':
+ if mod[-3:] == '.py':
mod = mod[:-3]
table[mod] = list = []
while 1:
line = fp.readline()
if not line: break
- while line[-1:] = '\\':
+ while line[-1:] == '\\':
nextline = fp.readline()
if not nextline: break
line = line[:-1] + nextline
diff --git a/Tools/scripts/ptags.py b/Tools/scripts/ptags.py
index b3a693e..fdf7bd1 100755
--- a/Tools/scripts/ptags.py
+++ b/Tools/scripts/ptags.py
@@ -33,7 +33,7 @@ def treat_file(file):
print 'Cannot open', file
return
base = path.basename(file)
- if base[-3:] = '.py': base = base[:-3]
+ if base[-3:] == '.py': base = base[:-3]
s = base + '\t' + file + '\t' + '1\n'
tags.append(s)
while 1:
diff --git a/Tools/scripts/suff.py b/Tools/scripts/suff.py
index 7fda113..a92557c 100755
--- a/Tools/scripts/suff.py
+++ b/Tools/scripts/suff.py
@@ -22,7 +22,7 @@ def main():
def getsuffix(file):
suff = ''
for i in range(len(file)):
- if file[i] = '.':
+ if file[i] == '.':
suff = file[i:]
return suff
diff --git a/Tools/scripts/which.py b/Tools/scripts/which.py
index b36c5ca..24071f4 100755
--- a/Tools/scripts/which.py
+++ b/Tools/scripts/which.py
@@ -23,7 +23,7 @@ for prog in sys.argv[1:]:
mode = S_IMODE(st[ST_MODE])
if mode % 2 or mode/8 % 2 or mode/64 % 2:
if ident:
- if st[:3] = ident:
+ if st[:3] == ident:
s = ': same as '
else:
s = ': also '
diff --git a/Tools/scripts/xxci.py b/Tools/scripts/xxci.py
index ef4ff11..27bb71d 100755
--- a/Tools/scripts/xxci.py
+++ b/Tools/scripts/xxci.py
@@ -50,19 +50,19 @@ def skipfile(file):
# Skip executables
try:
data = open(file, 'r').read(len(EXECMAGIC))
- if data = EXECMAGIC: return 1
+ if data == EXECMAGIC: return 1
except:
pass
return 0
def badprefix(file):
for bad in badprefixes:
- if file[:len(bad)] = bad: return 1
+ if file[:len(bad)] == bad: return 1
return 0
def badsuffix(file):
for bad in badsuffixes:
- if file[-len(bad):] = bad: return 1
+ if file[-len(bad):] == bad: return 1
return 0
def go(args):