title: how to call a function from another file?
body: <p>Sorry basic question I'm sure but I can't seem to figure this out.</p>
  
  <p>Say I have this program , the file is called <code>pythonFunction.py</code>:</p>
  
  <pre><code>def function():
     return 'hello world'
  
  if __name__=='__main__':
     print function()
  </code></pre>
  
  <p>How can I call it in another program?
  I tried:</p>
  
  <pre><code>import pythonFunction as pythonFunction
  print pythonFunction.function
  </code></pre>
  
  <p>Instead of 'hello world', I get  ...I have done this in the past by making the first file a class, but I was wondering how to import the function correctly?  If it helps, in my real file, I am printing a dictionary</p>