changeset: 102694:cddd633b959f branch: 2.7 parent: 102688:4ca84a3e37d7 user: Terry Jan Reedy date: Tue Aug 16 01:44:06 2016 -0400 files: Lib/lib-tk/Tix.py description: Issue #27611: Don't import volatile attribute. diff -r 4ca84a3e37d7 -r cddd633b959f Lib/lib-tk/Tix.py --- a/Lib/lib-tk/Tix.py Mon Aug 15 22:01:41 2016 -0700 +++ b/Lib/lib-tk/Tix.py Tue Aug 16 01:44:06 2016 -0400 @@ -26,8 +26,10 @@ # appreciate the advantages. # +import os +import Tkinter from Tkinter import * -from Tkinter import _flatten, _cnfmerge, _default_root +from Tkinter import _flatten, _cnfmerge # WARNING - TkVersion is a limited precision floating point number if TkVersion < 3.999: @@ -72,7 +74,6 @@ # BEWARE - this is implemented by copying some code from the Widget class # in Tkinter (to override Widget initialization) and is therefore # liable to break. -import Tkinter, os # Could probably add this to Tkinter.Misc class tixCommand: @@ -476,7 +477,7 @@ (multiple) Display Items""" def __init__(self, itemtype, cnf={}, **kw): - master = _default_root # global from Tkinter + master = Tkinter._default_root if not master and 'refwindow' in cnf: master=cnf['refwindow'] elif not master and 'refwindow' in kw: master= kw['refwindow'] elif not master: raise RuntimeError, "Too early to create display style: no root window"