Move the "from Tkinter import *" out of the method and into the module

scope (still inside the __name__=='__main__' guard).  Necessitated by
recent addition of nested scopes.
This commit is contained in:
Barry Warsaw 2001-02-01 20:52:08 +00:00
parent 4589bd82da
commit 74a7ece9f3
1 changed files with 2 additions and 1 deletions

View File

@ -90,9 +90,10 @@ def save():
# test stuff
if __name__ == '__main__':
from Tkinter import *
class Tester:
def __init__(self):
from Tkinter import *
self.__root = tk = Tk()
b = Button(tk, text='Choose Color...', command=self.__choose)
b.pack()