Python debugger (pdb) stopped handlying up/down arrows, shows ^[[A instead
I found this problem exists when outputting to both console and file using python file.py 2>&1 | tee output.txt
:
How to redirect stdout to both file and console with scripting?
After removing 2>&1 | tee output.txt
, this problem (up arrow becomes ^[[A
in pdb) disappear.
See Python interactive mode history and arrow keys. In my case, Amadan's answer worked; I already had the readline module.