title: 'Tk' is not defined
body: <p>I am new to Python.  I downloaded Spyder 2.3.1 and am running Python 2.7 on my Mac.  I tried this sample program:</p>
  
  <pre><code>from Tkinter import *
  root = Tk()
  
  w = Label(root, text="Hello, world!")
  w.pack()
  
  root.mainloop()
  </code></pre>
  
  <p>When I run, I get the error message:</p>
  
  <pre><code>NameError: name 'Tk' is not defined
  </code></pre>
  
  <p>If I look in the file Tkinter.py, it has the following lines of code:</p>
  
  <pre><code>from Tkinter import *
  root = Tk()
  
  w = Label(root, text="Hello, world!")
  w.pack()
  
  root.mainloop()
  </code></pre>
  
  <p>Looks like an infinite loop, but what it is complaining about is "Tk" saying "name not defined".  Any help would be greatly appreciated.</p>
  
  <hr>
  
  <p>p.s. I tried <code>python -m idlelib.idle</code> in a Terminal window and got the error <code>NameError: name 'Tk' is not defined</code></p>