[IPython-dev] IPython In-process kernel support

Evan Patterson epatters at enthought.com
Thu Sep 6 17:39:36 EDT 2012


There is no real obstacle, but it isn't very convenient. The trouble is
that the terminal frontend is truly synchronous, unlike a GUI frontend
which is driven by an event loop. Here is how the terminal frontend
executes code:

https://github.com/ipython/ipython/blob/master/IPython/frontend/terminal/console/interactiveshell.py#L94

You can see that 'handle_stdin_request' will never be called. To handle
stdin, something must be special cased: the terminal frontend, the embedded
kernel, or the embedded kernel manager. I'm not sure how to handle this
cleanly. Perhaps the simplest thing is to add a switch to the kernel for
calling 'raw_input' directly (bypassing the kernel manager). Only terminal
frontends would use this switch. Perhaps others have better ideas.

Evan

On Thu, Sep 6, 2012 at 4:20 PM, Thomas Kluyver <takowl at gmail.com> wrote:

> Is there any major obstacle to implementing raw_input in the terminal
> frontend, or do you think it's just not worth it?
> _______________________________________________
> IPython-dev mailing list
> IPython-dev at scipy.org
> http://mail.scipy.org/mailman/listinfo/ipython-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20120906/cbdff2d5/attachment.html>


More information about the IPython-dev mailing list