What is the keyboard shortcut to go to the beginning of a line in iPython?

During input in iPython, by pressing CTRL+A , I get the front of the line as expected.

Now, after entering the line and calling it by pressing Up arrow , I want to return to the front again, so I press CTRL+A :

enter image description here

Why am I now stuck on the right side of the screen in an empty line? If I click Up arrow , then Down arrow here I get the original line, and then I can CTRL+A forward, but I really don’t know why I was put on the right side in the first place.

I'm on OS X 10.8.2

+4
source share
1 answer

There are various known incompatibilities with the default line editing library included with OSX called libedit . So much so that IPython should start with a warning: "libedit detected, readline will not behave well."

The same warning should show you how to solve it: do easy_install readline to install the standard readline library, which behaves much better.

(Note that for reasons that I don’t quite understand, you probably need to use easy_install rather than pip, as I usually recommend.)

+7
source

All Articles