[IPython-dev] Fwd: wxPython console

Fernando Perez fperez.net@gmail....
Wed Nov 9 00:47:39 CST 2011


Forgot to cc the list...

---------- Forwarded message ----------
From: Fernando Perez <fperez.net@gmail.com>
Date: Tue, Nov 8, 2011 at 5:26 PM
Subject: Re: [IPython-dev] wxPython console
To: Emmanuel Bacry <emmanuel.bacry@polytechnique.fr>


On Tue, Nov 8, 2011 at 1:37 PM, Emmanuel Bacry
<emmanuel.bacry@polytechnique.fr> wrote:
> 2 processes are running right ? One with the wxmainloop and the kernel and one with the qtconsole which dialog with the kernel of the first process.
> I don't quite understand how the wx mainloop and the kernel coexist in the same kernel. They are in the same thread right ? So when the kernel is running the main loop is not looping any more (idle events are not executed) right ? (it is not clear where this is in the code you pointed to)
> Then how can you interrupt properly the execution of  a command run by the kernel ?
>

Yes, when the IPython kernel is *executing user code* the wx event
loop is blocked.  But otherwise the kernel is just sitting there,
waiting for events to arrive over the network.  Simply try running the
example

./ipkernel_wxapp.py

in the docs/examples/lib directory and play with it.  A little bit of
interactive experimentation should clarify things.  Let us know if
that's not enough.

Cheers,

f


More information about the IPython-dev mailing list