]> granicus.if.org Git - python/commitdiff
Issue #25507: Merge from 3.5 with ttk replacing colorchooser.
authorTerry Jan Reedy <tjreedy@udel.edu>
Sat, 16 Jul 2016 22:27:11 +0000 (18:27 -0400)
committerTerry Jan Reedy <tjreedy@udel.edu>
Sat, 16 Jul 2016 22:27:11 +0000 (18:27 -0400)
IDLE no longer runs buggy code because of its tkinter imports.
Users must include the same imports required to run directly in Python.

1  2 
Lib/idlelib/run.py

index 10ede99e33742b83359da4d6cb27f18ba7eb32c8,28ce4200a92a534919ea5881fc1c8b5f510d81b1..c7ee0b3e458bbae7c1db9134f5b7a687a1a685f3
@@@ -19,6 -19,12 +19,12 @@@ from idlelib import iomen
  
  import __main__
  
 -            'colorchooser'):
+ 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