From: Terry Jan Reedy Date: Sat, 16 Jul 2016 22:26:32 +0000 (-0400) Subject: Issue #25507: IDLE no longer runs buggy code because of its tkinter imports. X-Git-Tag: v3.6.0a4~163^2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=ff1d5ab16e6424cf000be314e3c5ca8e42ae43f4;p=thirdparty%2FPython%2Fcpython.git Issue #25507: 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 595e7bc3aa11..28ce4200a92a 100644 --- a/Lib/idlelib/run.py +++ b/Lib/idlelib/run.py @@ -19,6 +19,12 @@ from idlelib import IOBinding import __main__ +for mod in ('simpledialog', 'messagebox', 'font', + 'dialog', 'filedialog', 'commondialog', + 'colorchooser'): + delattr(tkinter, mod) + del sys.modules['tkinter.' + mod] + LOCALHOST = '127.0.0.1' import warnings