The first chapters of Learning Python describe a number of these environments, including one called IDLE, which comes with most distributions of Python.
I recommend iPython. Here is a tutorial; here its online manual; and here several videos. Finally, iPython when it starts up presents you with an option to read an introduction.
iPython is really a shell for Python. Compared to GUI-based program development environments, using iPython provides a fairly bare-bones environment, but it is a reasonable place to start.
iPython lets you use your favorite text editor for editing program files. You can configure this however you like. For most, there won't be much to configure.
For example, vi is the default on Unix/Linux/Mac. (If you're new to vi, take a look at the vi tutorial.)
iPython defaults to Notepad on Windows. I suggest, however, that you install Programmer's Notepad. This is described on Python install for Windows. It's a more functional editor.
If you're an emacs fan, see setup and other paragraphs on emacs in the iPython tutorial.
Start-up ipython in a terminal window:
101}ipython Python 2.4.3 (#1, Sep 22 2006, 18:24:12) Type "copyright", "credits" or "license" for more information. IPython 0.7.3 -- An enhanced Interactive Python. ? -> Introduction to IPython's features. %magic -> Information about IPython's 'magic' % functions. help -> Python's own help system. object? -> Details about 'object'. ?object also works, ?? prints more. In [1]:
To edit a program file, we use one of iPython's magic commands (which begin with a '%'):
%editIf you want to see the online documentation for its options, type
%edit?at the iPython prompt. (You hit the spacebar to page through the documentation. Hit 'q' to exit.)
The edit command, and many of iPython's magic commands, can be abbreviated. %edit becomes simply ed. So to edit the file test.py, you enter
ed test.pyHere's what I put in test.py:
print 'Hello world' print 2**100Now exit the editor. You then see on the terminal
Hello world 1267650600228229401496703205376That is, %edit automatically runs the code in the file, when you exit your editor.
You can suppress this, by using the -x option:
ed -x test.py
You can run a particular file, using
run test.pywhere test.py can be any Python program. Note that run is an abbreviation of the iPython %run magic command.
That's basically it for writing and running Python programs within iPython. Naturally, there are many, many more convenience features in iPython. For more, see Quick Tips and read through the tutorial and online manuals, linked above.