]> granicus.if.org Git - python/commitdiff
Issue #27611: Don't import volatile attribute.
authorTerry Jan Reedy <tjreedy@udel.edu>
Tue, 16 Aug 2016 05:44:12 +0000 (01:44 -0400)
committerTerry Jan Reedy <tjreedy@udel.edu>
Tue, 16 Aug 2016 05:44:12 +0000 (01:44 -0400)
Lib/tkinter/tix.py

index f667933a1ed5ad15839a3ea0e74618453b02352e..89113fd1eb0ce30b827da22436d6ccd1606f2fdb 100644 (file)
 # appreciate the advantages.
 #
 
+import os
+import tkinter
 from tkinter import *
-from tkinter import _cnfmerge, _default_root
+from tkinter import _cnfmerge
 
 # WARNING - TkVersion is a limited precision floating point number
 if TkVersion < 3.999:
@@ -72,7 +74,6 @@ TCL_ALL_EVENTS    = 0
 # 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 @@ class DisplayStyle:
     (multiple) Display Items"""
 
     def __init__(self, itemtype, cnf={}, **kw):
-        master = _default_root              # global from Tkinter
+        master = tkinter._default_root              # global from Tkinter
         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")