mirror of
https://github.com/python/cpython.git
synced 2025-10-09 16:34:44 +00:00
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.
This commit is contained in:
parent
7ca63cb7cc
commit
ff1d5ab16e
1 changed files with 6 additions and 0 deletions
|
@ -19,6 +19,12 @@ from idlelib import IOBinding
|
||||||
|
|
||||||
import __main__
|
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'
|
LOCALHOST = '127.0.0.1'
|
||||||
|
|
||||||
import warnings
|
import warnings
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue