I am pretty new to Python and I have been pretty annoyed with this problem. I am not sure if this matters, but I run my .py file with Python 2.7.6 with python installed on m
Yes, as @shortfellow said, running it from the terminal should work:
python your_file.py
Another tip that helps in Python, if you are having a hard time with errors, is to use iPython for debugging/testing code on the spot. You can give it a try.
http://ipython.org/
You should run it from command window/terminal instead of double clicking on the file.