[IPython-dev] Cython based PyOS_InputHook hack

Gael Varoquaux gael.varoquaux@normalesup....
Sun Feb 8 06:07:16 CST 2009


On Sun, Feb 08, 2009 at 01:59:25PM +0200, Ville M. Vainio wrote:
> On Sun, Feb 8, 2009 at 12:28 PM, Gael Varoquaux
> <gael.varoquaux@normalesup.org> wrote:

> > Sorry, Brain, I don't know wx well-enough to do this without a
	    ^
	Sorry, Brian, this was a typo.
> > significant time investement (these things are tricky). I don't see myself

> Inferring from your other mail, it would only seem necessary to call
> the mainloops Yield in the input hook function.

I believe this is very risky. Yield is a very fragile function. For
instance, under Windows, calling a Yield inside a Yield is not possible.
So if you have a GUI callback that calls a raw_input, you are likely to
end up in this situation (recursive call of Yield) when plugging readline
in the GUI as currently done with "ipython -wthread".

I am not saying this is not the way to go. I am saying it needs thinking
and validation.

Gaël


More information about the IPython-dev mailing list