I don't understand Python's main block. What is that thing?
<blockquote>
  <p><strong>Possible Duplicate:</strong><br>
  <a href="http://stackoverflow.com/questions/419163/what-does-if-name-main-do">What does &lt;if __name__==“__main__”:&gt; do?</a>  </p>
</blockquote>



<p>So I start up pyscripter and I get a file with this in it:</p>

<pre><code>def main():
    pass

if __name__ == '__main__':
    main()
</code></pre>

<p>What is that? Why does my program work without it as well? Whats the purpose for this anyway?
Where would my code go? Lets say a a function that prints hello world. Where would that go? where would I call it?</p>
