[IPython-dev] pyreadline

Gael Varoquaux gael.varoquaux at normalesup.org
Wed Mar 26 16:56:45 EDT 2008

On Wed, Mar 26, 2008 at 09:47:27PM +0100, Laurent Dufréchou wrote:
> One important point, gael tells me that usually readline get all
> character
> received from a frontend and it handle it.
> I think, (perhaps I'm wrong) that from a GUI designer point of view, I
> would
> greatly prefer to send to readline full string instead of character.
> Key
> event handling is tighly managed by gui itself, so I think it is a
> little
> complex to send it to readline with readline being GUI agnostic...

OK, but how to you choose how a key must behave? You need one single
object that knows the configuration of keys (is pageup history, or
nothing?), and what if I want to switch to VI mode, you don't want to
implement this in all the frontends.

Sending a string defeats the goal of readline: readline is what
translates keystrokes to a command string. Readline knows that if I use
"ctr-left", it should jump the cursor one word to the left. Yes, it is
not easy, but that's what readline is about, IMHO.


More information about the IPython-dev mailing list