[IPython-dev] IPython In-process kernel support

Evan Patterson epatters at enthought.com
Thu Sep 6 18:12:24 EDT 2012


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

> On 6 September 2012 22:39, Evan Patterson <epatters at enthought.com> wrote:
> > 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.
>
> OK, that makes sense. My inclination would be to leave it until
> someone finds they actually need it - as you say, running in the
> terminal with a local kernel seems a bit odd. If it did become
> necessary, another possible route would be to run the kernel in its
> own thread, so a degree of asynchronous execution was possible.
> Although I'm sure any solution with the word 'thread' in has its share
> of problems.
>
> > About raw_input, I think Robert Kern (in his original gist) caught it
> and transformed to a QInputDialog. It would be nice to have something like
> that before merging.
>
> If I understand Evan correctly, the problem with raw_input is only
> when using this in the terminal frontend. In the Qt console, I assume
> it behaves like a remote kernel - the prompt appears inline. Evan, can
> you confirm that?
>

Yes, that's exactly how it works.

Evan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20120906/0afa4a04/attachment.html>


More information about the IPython-dev mailing list