title: Python Idle and Terminal Import Differences
body: <p>I just started using Python and I have a question about idle vs terminal.</p>
  
  <p>In idle, I made a file called Robot.py</p>
  
  <p>I have a class called Robot</p>
  
  <pre><code>class Robot(object)
  
      def __init__(self,x,y):
          #some code here etc...
  
  def HelloWorld()
      print "Hello World!"
  </code></pre>
  
  <p>I have another file called testrobot.py, which looks like so:</p>
  
  <pre><code>import Robot
  r = Robot(1,4)
  </code></pre>
  
  <p>In idle, I am able to successfully create a Robot object when I run testrobot.py. However in terminal, it gives an error Message <code>NameError: Robot is not defined</code></p>
  
  <p>I'm not sure how to run my program in terminal.</p>
  
  <p>Also:</p>
  
  <p>How can I call my <code>HelloWorld()</code> function which is in Robots.py but not of the class Robot in an external file (such as testrobot.py)?</p>
  
  <p>Thanks in advance!</p>