3
# DP: suggest installation of python-tk package on failing _tkinter import
6
if [ $# -eq 3 -a "$2" = '-d' ]; then
9
elif [ $# -ne 1 ]; then
10
echo >&2 "usage: `basename $0`: -patch|-unpatch [-d <srcdir>]"
15
patch $pdir -f --no-backup-if-mismatch -p0 < $0
18
patch $pdir -f --no-backup-if-mismatch -R -p0 < $0
21
echo >&2 "usage: `basename $0`: -patch|-unpatch [-d <srcdir>]"
26
--- Lib/tkinter/__init__.py~ 2008-05-30 13:47:28.000000000 +0200
27
+++ Lib/tkinter/__init__.py 2008-05-30 13:57:04.000000000 +0200
29
if sys.platform == "win32":
30
# Attempt to configure Tcl/Tk without requiring PATH
31
from tkinter import _fix
32
-import _tkinter # If this fails your Python may not be configured for Tk
35
+except ImportError as msg:
36
+ raise ImportError(str(msg) + ', please install the python-tk package')
37
TclError = _tkinter.TclError
38
from tkinter.constants import *