[IPython-dev] New ipythonqt console questions/feedback

MinRK benjaminrk@gmail....
Fri Oct 8 17:41:01 CDT 2010


On Fri, Oct 8, 2010 at 15:37, Fernando Perez <fperez.net@gmail.com> wrote:

> On Thu, Oct 7, 2010 at 7:20 PM, MinRK <benjaminrk@gmail.com> wrote:
> > I don't think it's as hard as you make it sound.
> > I just changed the close dialog so it has 3 options:
> > a) full shutdown,
> > b) only close console,
> > c) Cancel; forget we ever met.
> > I only added case b), and it's just a few lines.
> > see here:
> >
> http://github.com/minrk/ipython/commit/cdb78a95f99540790cdf7960e52941d2ef1af2a3
> > The only thing that *doesn't* seem to work, is that you have to ctrl-C or
> > some such to terminate the original Qt process if you close the original
> > console.  Other consoles can shutdown the kernel later, but the process
> > doesn't die.
> > Note: this is really a proof of concept.  Yes/No/Cancel is generally not
> a
> > good dialog if you want things to be clear.
>
> Thanks for the test.  The problem you note may be perhaps that you're
> not emitting the right signal?  I'm not sure, my Qt-fu is pretty
> limited.
>
> But the reason I said it could be a startup flag was because I had
> understood that something had to be done differently *at
> initialization* if we wanted to bypass the logic Evan had added.
>
> Was I mistaken in that understanding?  I didn't write that code so I'm
> not sure right now...
>

It doesn't necessarily have to be done differently at startup, because you
can 'destroy' a widget at any point, leaving the process alive.

I just updated my keepkernel branch with a couple things:

1) fixed error when resetting pykernel (it still reset, but printed an
error)
2) fixed issue where closing a frontend, even secondary ones, always
shutdown the kernel
3) shutdown_reply now goes out on the pub socket, so all clients are
notified
   3.a) this means that all clients can (and do) refresh the screen when a
reset is called, just like the master frontend
4) kernel can stay alive after consoles are shutdown, and can be shutdown by
any frontend at any point
   4.a) this means that a shutdown request from any frontend can close all
open frontends and the kernel, even if the kernel is detached, leaving no
processes zombified.
   4.b) 4.a required that a 'reset' element be added to
shutdown_request/reply messages to identify the difference between a real
shutdown message and stage 1 of a reset.

http://github.com/minrk/ipython/commits/keepkernel/

-MinRK



>
> Cheers,
>
> f
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.scipy.org/pipermail/ipython-dev/attachments/20101008/ba5f3eb6/attachment.html 


More information about the IPython-dev mailing list