summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Lib/lib-tk/FixTk.py13
1 files changed, 9 insertions, 4 deletions
diff --git a/Lib/lib-tk/FixTk.py b/Lib/lib-tk/FixTk.py
index c0af29b..029e7cd 100644
--- a/Lib/lib-tk/FixTk.py
+++ b/Lib/lib-tk/FixTk.py
@@ -1,6 +1,11 @@
import sys, os, _tkinter
+
ver = str(_tkinter.TCL_VERSION)
-for t in "tcl", "tk":
- v = os.path.join(sys.prefix, "tcl", t+ver)
- if os.path.exists(os.path.join(v, "tclIndex")):
- os.environ[t.upper() + "_LIBRARY"] = v
+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[key] = v