Why does my python script just open IDLE?
<p>I can't understand why running my Python program just opens IDLE. </p>

<p>Not sure if this is more appropriate on SuperUser, but here goes: I can't run python scripts from my command line.</p>

<p>OSX 10.7.4, fresh install of python 3.2.3. I've got the following python script as <code>test.py</code>:</p>

<pre><code>#! /usr/bin/env python
print("hello world")
</code></pre>

<p>I then make it executable:</p>

<pre><code>$&gt; chmod +x test.py
</code></pre>

<p>Then <strong>all</strong> of the following cause the terminal to open IDLE, with no other output of any kind, i.e. the script is not run:</p>

<ul>
<li>python test.py</li>
<li>python -i test.py</li>
<li>./test.py</li>
</ul>

<p>Even <code>python -c 'print(5)'</code> dumps me into IDLE without actually executing the command! IDLE itself works fine. Anyone know what could be going on?</p>
