diff options
Diffstat (limited to 'Lib/idlelib/PyShell.py')
-rw-r--r-- | Lib/idlelib/PyShell.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/Lib/idlelib/PyShell.py b/Lib/idlelib/PyShell.py index 81ef88e..b6205ca 100644 --- a/Lib/idlelib/PyShell.py +++ b/Lib/idlelib/PyShell.py @@ -16,7 +16,12 @@ import exceptions import linecache from code import InteractiveInterpreter -from Tkinter import * +try: + from Tkinter import * +except ImportError: + print>>sys.__stderr__, "** IDLE can't import Tkinter. " \ + "Your Python may not be configured for Tk. **" + sys.exit(1) import tkMessageBox from EditorWindow import EditorWindow, fixwordbreaks |