Add this to your PYTHONSTARTUP (~/.pythonrc.py) file:
try:
import readline
except ImportError:
print "Module readline not available."
else:
import rlcompleter
readline.parse_and_bind("tab: complete")
then:
export PYTHONSTARTUP=~/.pythonrc.py
python
or add PYTHONSTARTUP entry to your shell profile