[IPython-User] Making Control-D work when the line is not clear

Fernando Perez fperez.net@gmail....
Tue Oct 18 22:00:59 CDT 2011

On Tue, Oct 18, 2011 at 7:08 PM, Aaron Meurer <asmeurer@gmail.com> wrote:
> Maybe I'm mistaken, but wouldn't it have to be IPython to do it, since
> the callback would have to run separately in a different process (like
> on the kernel or something)?

The point is that the readline api is pretty simple and doesn't offer
a way to hook arbitrary code to key events in general.  It only offers
a few specific calls, mostly of its own implementation, that you can
configure.  So I don't know how to begin hooking IPython in there...
Perhaps I've totally misunderstood your question though, if that's the
case try to rephrase it in one shot :)

> Anyway, maybe it's something to think about for the QT console, where
> you have more control over these things.

There, we *do* have full event handling control, and something like
that can certainly be considered.



More information about the IPython-User mailing list