summaryrefslogtreecommitdiffstats
path: root/Lib/idlelib
diff options
context:
space:
mode:
authorTerry Jan Reedy <tjreedy@udel.edu>2016-07-16 22:26:32 (GMT)
committerTerry Jan Reedy <tjreedy@udel.edu>2016-07-16 22:26:32 (GMT)
commitff1d5ab16e6424cf000be314e3c5ca8e42ae43f4 (patch)
tree2d2101a31bf2dabbc4c5fb088ea0958f848488f6 /Lib/idlelib
parent7ca63cb7cc0ea962f40559ba57f767e38d7f1af7 (diff)
downloadcpython-ff1d5ab16e6424cf000be314e3c5ca8e42ae43f4.zip
cpython-ff1d5ab16e6424cf000be314e3c5ca8e42ae43f4.tar.gz
cpython-ff1d5ab16e6424cf000be314e3c5ca8e42ae43f4.tar.bz2
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.
Diffstat (limited to 'Lib/idlelib')
-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 595e7bc..28ce420 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