summaryrefslogtreecommitdiffstats
path: root/Tools/modulator
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2008-05-16 17:02:34 (GMT)
committerGeorg Brandl <georg@python.org>2008-05-16 17:02:34 (GMT)
commitbf82e374ee737992235cbe944c9ddbd58236a892 (patch)
treef8c8dccaa76d58f9cb7d8cc0abb1355be75ee369 /Tools/modulator
parentacbca71ea775fc488bead0876d0cdbd48670dcbc (diff)
downloadcpython-bf82e374ee737992235cbe944c9ddbd58236a892.zip
cpython-bf82e374ee737992235cbe944c9ddbd58236a892.tar.gz
cpython-bf82e374ee737992235cbe944c9ddbd58236a892.tar.bz2
More 2to3 fixes in the Tools directory. Fixes #2893.
Diffstat (limited to 'Tools/modulator')
-rw-r--r--Tools/modulator/ScrolledListbox.py4
-rwxr-xr-xTools/modulator/genmodule.py2
-rwxr-xr-xTools/modulator/modulator.py2
-rw-r--r--Tools/modulator/varsubst.py2
4 files changed, 5 insertions, 5 deletions
diff --git a/Tools/modulator/ScrolledListbox.py b/Tools/modulator/ScrolledListbox.py
index 8bb5738..2ec646d 100644
--- a/Tools/modulator/ScrolledListbox.py
+++ b/Tools/modulator/ScrolledListbox.py
@@ -19,7 +19,7 @@ class ScrolledListbox(Listbox):
fcnf = {}
vcnf = {'name': 'vbar',
Pack: {'side': 'right', 'fill': 'y'},}
- for k in cnf.keys():
+ for k in list(cnf.keys()):
if type(k) == ClassType or k == 'name':
fcnf[k] = cnf[k]
del cnf[k]
@@ -32,6 +32,6 @@ class ScrolledListbox(Listbox):
self.vbar['command'] = (self, 'yview')
# Copy Pack methods of self.frame -- hack!
- for m in Pack.__dict__.keys():
+ for m in Pack.__dict__:
if m[0] != '_' and m != 'config':
setattr(self, m, getattr(self.frame, m))
diff --git a/Tools/modulator/genmodule.py b/Tools/modulator/genmodule.py
index 7df3983..f8703ef 100755
--- a/Tools/modulator/genmodule.py
+++ b/Tools/modulator/genmodule.py
@@ -40,7 +40,7 @@ class writer:
def makesubst(self):
if not self._subst:
- if not self.__dict__.has_key('abbrev'):
+ if 'abbrev' not in self.__dict__:
self.abbrev = self.name
self.Abbrev = self.abbrev[0].upper()+self.abbrev[1:]
subst = varsubst.Varsubst(self.__dict__)
diff --git a/Tools/modulator/modulator.py b/Tools/modulator/modulator.py
index d4b8510..d719649 100755
--- a/Tools/modulator/modulator.py
+++ b/Tools/modulator/modulator.py
@@ -17,7 +17,7 @@
#
import sys, os
-if os.name <> 'mac':
+if os.name != 'mac':
sys.path.append(os.path.join(os.environ['HOME'],
'src/python/Tools/modulator'))
diff --git a/Tools/modulator/varsubst.py b/Tools/modulator/varsubst.py
index 473fb55..4b68512 100644
--- a/Tools/modulator/varsubst.py
+++ b/Tools/modulator/varsubst.py
@@ -28,7 +28,7 @@ class Varsubst:
s = s[2:]
continue
name = m.group(1)
- if not self.dict.has_key(name):
+ if name not in self.dict:
raise error('No such variable: '+name)
value = self.dict[name]
if self.do_useindent and '\n' in value: