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()
in order to launch the python debugger (pdb).
Up until today, this worked fine. But now when the pdb starts, it works for debugging and running and breakpoints etc, but when I press the up arrow to show the previous command it prints ^[[A
instead an doesn't go up. When I type something and press Home, it prints ^[OH
instead of moving the cursor.
I can use up/home/etc. fine in the bash terminal which launches my python django unittests (which has the pdb call).
What's going on? How do I fix my pdb? What's wrong with my readline?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…