summaryrefslogtreecommitdiffstats
path: root/Lib/idlelib/pyshell.py
diff options
context:
space:
mode:
authorTerry Jan Reedy <tjreedy@udel.edu>2016-06-21 22:41:38 (GMT)
committerTerry Jan Reedy <tjreedy@udel.edu>2016-06-21 22:41:38 (GMT)
commitb60adc54d4f248d71d831d14e11cc77fe72c281e (patch)
tree40991b8eacb5eea9cfe04e7dbb2cb20149b868f2 /Lib/idlelib/pyshell.py
parentaacd53f6cb96fe8c4fe9ce894f22e25f356a97c3 (diff)
downloadcpython-b60adc54d4f248d71d831d14e11cc77fe72c281e.zip
cpython-b60adc54d4f248d71d831d14e11cc77fe72c281e.tar.gz
cpython-b60adc54d4f248d71d831d14e11cc77fe72c281e.tar.bz2
Issue #24137: Run IDLE, test_idle, and htest with tkinter default root disabled.
Fix code and tests that fail with this restriction. Fix htests to not create a second and redundant root and mainloop.
Diffstat (limited to 'Lib/idlelib/pyshell.py')
-rwxr-xr-xLib/idlelib/pyshell.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/Lib/idlelib/pyshell.py b/Lib/idlelib/pyshell.py
index 0f7a01d..3e8351f 100755
--- a/Lib/idlelib/pyshell.py
+++ b/Lib/idlelib/pyshell.py
@@ -1547,7 +1547,9 @@ def main():
enable_edit = enable_edit or edit_start
enable_shell = enable_shell or not enable_edit
- # start editor and/or shell windows:
+ # Setup root.
+ if use_subprocess: # Don't break user code run in IDLE process
+ NoDefaultRoot()
root = Tk(className="Idle")
root.withdraw()
@@ -1563,6 +1565,7 @@ def main():
icons = [PhotoImage(file=iconfile) for iconfile in iconfiles]
root.wm_iconphoto(True, *icons)
+ # start editor and/or shell windows:
fixwordbreaks(root)
fix_x11_paste(root)
flist = PyShellFileList(root)