summaryrefslogtreecommitdiff
path: root/Lib/lib-tk/FixTk.py
diff options
context:
space:
mode:
authorBenjamin Peterson <benjamin@python.org>2009-10-09 22:15:50 +0000
committerBenjamin Peterson <benjamin@python.org>2009-10-09 22:15:50 +0000
commit6e3dbbdf39f3b4eb6f18c0165e446df17218b7dc (patch)
tree09bb1d277d25af8ed32f042ff8fce5549105bc76 /Lib/lib-tk/FixTk.py
parentde0559998fef231efc9ecbdef5b3a195d4eaa28d (diff)
downloadcpython-git-6e3dbbdf39f3b4eb6f18c0165e446df17218b7dc.tar.gz
replace has_key with 'in' operator
Diffstat (limited to 'Lib/lib-tk/FixTk.py')
-rw-r--r--Lib/lib-tk/FixTk.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/Lib/lib-tk/FixTk.py b/Lib/lib-tk/FixTk.py
index cb60b6125c..638a94c0d2 100644
--- a/Lib/lib-tk/FixTk.py
+++ b/Lib/lib-tk/FixTk.py
@@ -52,7 +52,7 @@ if not os.path.exists(prefix):
# if this does not exist, no further search is needed
if os.path.exists(prefix):
prefix = convert_path(prefix)
- if not os.environ.has_key("TCL_LIBRARY"):
+ if "TCL_LIBRARY" not in os.environ:
for name in os.listdir(prefix):
if name.startswith("tcl"):
tcldir = os.path.join(prefix,name)
@@ -62,13 +62,13 @@ if os.path.exists(prefix):
# as Tcl
import _tkinter
ver = str(_tkinter.TCL_VERSION)
- if not os.environ.has_key("TK_LIBRARY"):
+ if "TK_LIBRARY" not in os.environ:
v = os.path.join(prefix, 'tk'+ver)
if os.path.exists(os.path.join(v, "tclIndex")):
os.environ['TK_LIBRARY'] = v
# We don't know the Tix version, so we must search the entire
# directory
- if not os.environ.has_key("TIX_LIBRARY"):
+ if "TIX_LIBRARY" not in os.environ:
for name in os.listdir(prefix):
if name.startswith("tix"):
tixdir = os.path.join(prefix,name)