summaryrefslogtreecommitdiffstats
path: root/Lib/lib-tk/Tkinter.py
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1999-01-04 18:06:45 (GMT)
committerGuido van Rossum <guido@python.org>1999-01-04 18:06:45 (GMT)
commitf8d579c5e3b9938599c1ae0a6a8a73b70ea1e5da (patch)
tree5bc377d67b337c8c7a7c4fdb8b500104d6e04da2 /Lib/lib-tk/Tkinter.py
parent88303194a5579647b30243ab85f3f3acfd610d3c (diff)
downloadcpython-f8d579c5e3b9938599c1ae0a6a8a73b70ea1e5da.zip
cpython-f8d579c5e3b9938599c1ae0a6a8a73b70ea1e5da.tar.gz
cpython-f8d579c5e3b9938599c1ae0a6a8a73b70ea1e5da.tar.bz2
This hopefully fixes the problem of having to set PATH
in autoexec.bat in order to find the Tcl DLLs -- Tkinter calls FixTk which will hunt around in a few common places and then set PATH and try again, or else issue a big clarifying error message.
Diffstat (limited to 'Lib/lib-tk/Tkinter.py')
-rw-r--r--Lib/lib-tk/Tkinter.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/Lib/lib-tk/Tkinter.py b/Lib/lib-tk/Tkinter.py
index 04a863a..344dd8a 100644
--- a/Lib/lib-tk/Tkinter.py
+++ b/Lib/lib-tk/Tkinter.py
@@ -2,7 +2,10 @@
__version__ = "$Revision$"
-import _tkinter # If this fails your Python is not configured for Tk
+import sys
+if sys.platform == "win32":
+ import FixTk # Attempt to configure Tcl/Tk without requiring PATH
+import _tkinter # If this fails your Python may not be configured for Tk
tkinter = _tkinter # b/w compat for export
TclError = _tkinter.TclError
from types import *