[IPython-dev] IPython In-process kernel support

Thomas Kluyver takowl at gmail.com
Thu Sep 6 18:08:29 EDT 2012

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?


More information about the IPython-dev mailing list