I am using python 2.6 in a virtualenv on an Ubuntu Linux 11.04 (natty) machine. I have this code in my (django) python code:
import pdb ; pdb.set_trace()
See Python interactive mode history and arrow keys. In my case, Amadan's answer worked; I already had the readline module.