[IPython-dev] Fwd: wxPython console

Emmanuel Bacry emmanuel.bacry at polytechnique.fr
Mon Apr 9 14:43:23 EDT 2012

I have been working a lot on the qtconsole, writing an efficient c++ library for math plots using wxwdigets.

I have one (simple) problem  : when running ipython in the qtconsole, is there a way to interrupt the execution of a command without restarting the whole kernel ??
A simple ctrl-c does that on ipython in a terminal window.
I am sure there is a good reason it is not working when running in the qt-console (locally on the same machine). I just want to understand what is going on.

Sorry for this "naive" question


Le 9 nov. 2011 à 07:47, Fernando Perez a écrit :

> Forgot to cc the list...
> ---------- Forwarded message ----------
> From: Fernando Perez <fperez.net at gmail.com>
> Date: Tue, Nov 8, 2011 at 5:26 PM
> Subject: Re: [IPython-dev] wxPython console
> To: Emmanuel Bacry <emmanuel.bacry at polytechnique.fr>
> On Tue, Nov 8, 2011 at 1:37 PM, Emmanuel Bacry
> <emmanuel.bacry at 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
> _______________________________________________
> IPython-dev mailing list
> IPython-dev at scipy.org
> http://mail.scipy.org/mailman/listinfo/ipython-dev

More information about the IPython-dev mailing list