Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
f8803b14
Commit
f8803b14
authored
Jul 30, 2015
by
Terry Jan Reedy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Issue 24759: Gracefull exit Idle if ttk import fails.
parent
5eb0c9a8
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
0 deletions
+10
-0
Lib/idlelib/PyShell.py
Lib/idlelib/PyShell.py
+10
-0
No files found.
Lib/idlelib/PyShell.py
View file @
f8803b14
...
...
@@ -23,6 +23,16 @@ except ImportError:
"Your Python may not be configured for Tk. **"
,
file
=
sys
.
__stderr__
)
sys
.
exit
(
1
)
import
tkinter.messagebox
as
tkMessageBox
try
:
from
tkinter
import
ttk
except
:
root
=
Tk
()
root
.
withdraw
()
tkMessageBox
.
showerror
(
"Idle Cannot Start"
,
"Idle now requires the tkinter.ttk module from tcl/tk 8.5+.
\
n
"
+
"It found tk %s and no ttk."
%
TkVersion
,
parent
=
root
)
sys
.
exit
(
1
)
from
idlelib.EditorWindow
import
EditorWindow
,
fixwordbreaks
from
idlelib.FileList
import
FileList
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment