mirror of
https://github.com/python/cpython.git
synced 2025-09-26 18:29:57 +00:00
Couple more has_keys() going...
This commit is contained in:
parent
6e23e3796d
commit
e014a13f03
5 changed files with 26 additions and 26 deletions
|
@ -13,7 +13,7 @@ import sys, os
|
|||
prefix = os.path.join(sys.prefix,"tcl")
|
||||
# if this does not exist, no further search is needed
|
||||
if os.path.exists(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)
|
||||
|
@ -23,13 +23,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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue