Two more things you need to do -
1. tell the shell that this file is to be processed by python.
You do that by putting a 'shebang' line as the first line in the script. Details here -
docs.python.org/2/using/unix.html
2. you need to be mindful of where your script will get its input and send its output. If you run the script from the command line or from idle the answer will be 'the console'. If you double-click an icon to execute it, what will happen?
How To Ask Questions The Smart Way: http://www.catb.org/~esr/faqs/smart-questions.html
How to Report Bugs Effectively: http://www.chiark.greenend.org.uk/~sgtatham/bugs.html