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:
parent
4589bd82da
commit
74a7ece9f3
|
@ -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()
|
||||
|
|
Loading…
Reference in New Issue