On this page: how to run commands in Python IDLE shell, writing and saving a Python script file, executing a script via F5, command-line history shortcuts
Get Started
Video Summary
We will be using Python's own IDLE as the GUI
Python IDLE opens up in a shell. You can type code in get the result out. (shell output)
Take a look at "Options" and configure IDLE if you wish
Learn More
On Macs, the shortcut for running your script is Fn + F5. In some Windows systems, it may be Fn + F5 or Ctrl + F5.
Another important set of IDLE shortcuts are the ones for accessing command-line history: Alt + p/n (p for previous, n for next) in Windows, and Ctrl + p/n in Mac. These shortcuts let you scroll through the list of previously entered commands. You can even edit them before pressing ENTER. This is handy because you no longer have to type everything from scratch! See this and this FAQ for details.
raw_input() is a built-in function for accepting a keyboard input. It will be explained in a later tutorial.
IDLE stands for Integrated DeveLopment Environment (for Python), but there is another, widely accepted, theory behind the naming.