diff options
author | Terry Jan Reedy <tjreedy@udel.edu> | 2016-07-16 18:27:11 -0400 |
---|---|---|
committer | Terry Jan Reedy <tjreedy@udel.edu> | 2016-07-16 18:27:11 -0400 |
commit | 41bc0678739e222eb491a00f95d89a178bac23d2 (patch) | |
tree | 8c1c0cfcc44d9c4151034bd444b005a22f799a52 /Lib/idlelib/run.py | |
parent | b2f8a801c236208ecc6401fce134771ba628ca78 (diff) | |
parent | ff1d5ab16e6424cf000be314e3c5ca8e42ae43f4 (diff) | |
download | cpython-git-41bc0678739e222eb491a00f95d89a178bac23d2.tar.gz |
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.
Diffstat (limited to 'Lib/idlelib/run.py')
-rw-r--r-- | Lib/idlelib/run.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Lib/idlelib/run.py b/Lib/idlelib/run.py index 10ede99e33..c7ee0b3e45 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 |