chanpkr
chanpkr

Reputation: 915

When I use python3 in the terminal, I can't move around with my direction buttons on my keyboard

Like the title whenever I try to move around a command line in python3 through terminal, I get this ^[[D, ^[[A, ^[[B, and ^[[C. So I can't move between characters. What is going on?

Upvotes: 0

Views: 187

Answers (2)

debil
debil

Reputation: 193

One solution is to install rlwrap and launch Python with

$ rlwrap python3.3

Of course, this doesn't remove the problem but rather bypasses it.

Upvotes: 0

Ramchandra Apte
Ramchandra Apte

Reputation: 4079

It looks like readline is not installed or working. Try running import readline and see whether it imports. This is usually because of building Python and not having the readline headers. In Debian/Ubuntu, one can install the libreadline-dev package. Then if you have compiled Python, rebuild Python with make to add readline support.

Upvotes: 1

Related Questions