I can't understand why running my Python program just opens IDLE.
Not sure if this is more appropriate on SuperUser, but here goes: I can't run python scripts from my command line.
OSX 10.7.4, fresh install of python 3.2.3. I've got the following python script as test.py:
#! /usr/bin/env python
print("hello world")
I then make it executable:
$> chmod +x test.py
Then all of the following cause the terminal to open IDLE, with no other output of any kind, i.e. the script is not run:
Even python -c 'print(5)' dumps me into IDLE without actually executing the command! IDLE itself works fine. Anyone know what could be going on?
Not very sure about the problem, but have you tried to run
python3 test.py
or change the shebang line to python3?
trying to take a look at the content in your "python" console script (e.g. by file ) may also help reveal why it is linked to IDLE.which python
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With