title: Programming in Python: Getting "name 'Tk' is not defined" only at Command Prompt, works in IDLE
body: <p>A question from a beginner just starting with Tkinter. I downloaded it and wrote the tutorial <code>Hello World</code> program, and it ran fine in IDLE. However, when I saved the program and ran it using command prompt, they all returned <code>NameError: name 'tk' is not defined.</code>
  I also tried going to the main Python command program and manually entering the code, and it worked fine. </p>
  
  <p>It only fails to recognize <code>Tk()</code> when run through command prompt or through double clicking.</p>
  
  <p>I have no idea what could be going on here.</p>
  
  <p>The code is simply the basic <code>Hello World</code> program that all tutorials teach you to write:</p>
  
  <pre><code>from Tkinter import *
  root = Tk()
  w = Label(root, text="Hello World")
  w.pack()
  
  root.mainloop()
  </code></pre>
  
  <p>Also because I know everybody is going to answer with it, I am not using 3.x and I have tried running the program with calling it "tkinter," it simply doesn't find the module.</p>
  
  <p>Apparently this program works on other people's computers, so it's not a problem with the code itself. Does anyone have any idea what could be causing this issue?</p>