The IDLE IDE (Integrated Development Environment) is included with the Raspbian image.
Starting Programming With IDLE
Run IDLE which will open the Python Shell window.
Select Menu > File > New Window
Write your program, e.g.
#!/usr/bin/python
print "Hello!";
To run it select Menu > Run > Run Module and you should see “Hello!” appear in the Python Shell window.

6 years ago
So do you have to open the file to run it or can you run a previously written script from the command line?