From: Barry Warsaw Date: Thu, 1 Feb 2001 20:52:08 +0000 (+0000) Subject: Move the "from Tkinter import *" out of the method and into the module X-Git-Tag: v2.1a2~40 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=74a7ece9f3b56d82ffc11a31307f3ad1382adb97;p=python 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. --- diff --git a/Tools/pynche/pyColorChooser.py b/Tools/pynche/pyColorChooser.py index 788ad5a0d6..1a920c3328 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()