[IPython-User] Keybindings on Ubuntu
Sat Oct 8 03:42:03 CDT 2011
thanks for the additional background on this. I'm not quite ready to jump
boat, but I had a brief look at the code Thomas linked to...
> Thomas already gave you the right pointers, but just to clarify
> further: it's not as simple as linking to readline itself, we pretty
> much have to reimplement much of the functionality of readline
> ourselves, since readline is a library that's intimately bound to a
> terminal console.
I see. Looking at console_widget.py it seems all this kind of
functionality is handled in Python code (which is nice; I was halfway
expecting to see this in Qt C++ code ...).
> In the long run there would be great payoff to
> doing this, as we'd have the relevant functionality available to use
> in the notebook, qt console, windows and osx (all environments that
> lack GNU readline).
> So this is a great, self-contained project that would be a very
> welcome contribution, just not a few line hack.
I think this is a very good idea. But looking at the code it seems
intimately bound to Qt, and adding the reverse search would be actually a
So how do you see readline handling as a self-contained project that can
be re-used across the various environments you mention? I could imagine
that input be passed to an input processor that allows readline functions
to be invoked, which in turn act on a History object, a Prompt and an
Output object. Where Prompt and Output would be specific to the particular
environment IPython runs on, but with the same API. But I guess none of
those abstractions are in place, right?!
So I would think that it takes someone to implement all those abstractions
in the current code, before you can go on to factor out the readline
functionality in a common module, right?!
More information about the IPython-User