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.
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 @@
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