summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTerry Jan Reedy <tjreedy@udel.edu>2016-07-16 22:27:11 (GMT)
committerTerry Jan Reedy <tjreedy@udel.edu>2016-07-16 22:27:11 (GMT)
commit41bc0678739e222eb491a00f95d89a178bac23d2 (patch)
tree8c1c0cfcc44d9c4151034bd444b005a22f799a52
parentb2f8a801c236208ecc6401fce134771ba628ca78 (diff)
parentff1d5ab16e6424cf000be314e3c5ca8e42ae43f4 (diff)
downloadcpython-41bc0678739e222eb491a00f95d89a178bac23d2.zip
cpython-41bc0678739e222eb491a00f95d89a178bac23d2.tar.gz
cpython-41bc0678739e222eb491a00f95d89a178bac23d2.tar.bz2
Issue #25507: Merge from 3.5 with ttk replacing colorchooser.
IDLE no longer runs buggy code because of its tkinter imports. Users must include the same imports required to run directly in Python.
-rw-r--r--Lib/idlelib/run.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/Lib/idlelib/run.py b/Lib/idlelib/run.py
index 10ede99..c7ee0b3 100644
--- a/Lib/idlelib/run.py
+++ b/Lib/idlelib/run.py
@@ -19,6 +19,12 @@ from idlelib import iomenu
import __main__
+for mod in ('simpledialog', 'messagebox', 'font',
+ 'dialog', 'filedialog', 'commondialog',
+ 'ttk'):
+ delattr(tkinter, mod)
+ del sys.modules['tkinter.' + mod]
+
LOCALHOST = '127.0.0.1'
import warnings