8

I recently upgraded to Ubuntu 10.04 LTS and refreshed my Python environment. I installed Python 2.7 from source. Unfortunately, I didn't notice that Setup.dist has the readline line commented out by default - by default, there is no readline support installed. I'm now using the Python interpreter as a REPL enough that the constant ^[[A and ^[[D are very obnoxious.

Can I add readline support quickly, or do I have to actually recompile Python again? It seems like the sort of thing where there should be a quick, sane way to do it, but I don't know such a way.

Brighid McDonnell
  • 4,219
  • 4
  • 35
  • 59

1 Answers1

12

There's a standalone gnureadline package available, you can install it using setuptools

$ easy_install readline

You might also consider using ipython instead.

cfc
  • 55
  • 8
Adam Byrtek
  • 11,653
  • 2
  • 31
  • 30