Skip to content
This repository was archived by the owner on Feb 13, 2025. It is now read-only.

Commit ff1d5ab

Browse files
committed
Issue python#25507: IDLE no longer runs buggy code because of its tkinter imports.
Users must include the same imports required to run directly in Python.
1 parent 7ca63cb commit ff1d5ab

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

Lib/idlelib/run.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,12 @@
1919

2020
import __main__
2121

22+
for mod in ('simpledialog', 'messagebox', 'font',
23+
'dialog', 'filedialog', 'commondialog',
24+
'colorchooser'):
25+
delattr(tkinter, mod)
26+
del sys.modules['tkinter.' + mod]
27+
2228
LOCALHOST = '127.0.0.1'
2329

2430
import warnings

0 commit comments

Comments
 (0)