Commit ea32cbb2 authored by Guido van Rossum's avatar Guido van Rossum

Suggestion from SF patch #470433 to avoid clobbering TCL_LIBRARY et

al. if already set.  Also adds TIX_LIBRARY (just in case).
(Note that this is entirely Windows specific.)
parent 5af588b7
import sys, os, _tkinter
ver = str(_tkinter.TCL_VERSION)
for t in "tcl", "tk":
for t in "tcl", "tk", "tix":
key = t.upper() + "_LIBRARY"
try:
v = os.environ[key]
except KeyError:
v = os.path.join(sys.prefix, "tcl", t+ver)
if os.path.exists(os.path.join(v, "tclIndex")):
os.environ[t.upper() + "_LIBRARY"] = v
os.environ[key] = v
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment