]> granicus.if.org Git - python/commitdiff
Move the "from Tkinter import *" out of the method and into the module
authorBarry Warsaw <barry@python.org>
Thu, 1 Feb 2001 20:52:08 +0000 (20:52 +0000)
committerBarry Warsaw <barry@python.org>
Thu, 1 Feb 2001 20:52:08 +0000 (20:52 +0000)
scope (still inside the __name__=='__main__' guard).  Necessitated by
recent addition of nested scopes.

Tools/pynche/pyColorChooser.py

index 788ad5a0d65fc04848344c3d0f12d019b78bb5b2..1a920c3328bfc2b1e425bc379e0e54c61d3e8387 100644 (file)
@@ -90,9 +90,10 @@ def save():
 \f
 # 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()