From 74a7ece9f3b56d82ffc11a31307f3ad1382adb97 Mon Sep 17 00:00:00 2001 From: Barry Warsaw Date: Thu, 1 Feb 2001 20:52:08 +0000 Subject: 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. --- Tools/pynche/pyColorChooser.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Tools/pynche/pyColorChooser.py b/Tools/pynche/pyColorChooser.py index 788ad5a..1a920c3 100644 --- a/Tools/pynche/pyColorChooser.py +++ b/Tools/pynche/pyColorChooser.py @@ -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() -- cgit v0.12