views:

45

answers:

1

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.

+2  A: 

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

$ easy_install readline

You might also consider using ipython instead.

Adam Byrtek
Does this answer the question?
mathepic
Oh hey, that worked. My right pinkie, spared from infinite backspacing, thanks you.
Sean M