How do I add tab completion to the Python shell?

This my Answer to the stackoverflow question: How do I add tab completion to the Python shell?:

I think django does something like http://www.python.org/doc/2.5.2/lib/module-rlcompleter.html

If you want to have a really good interactive interpreter have a look at http://ipython.scipy.org/.