[IPython-dev] Uniform way of integrating event loops among different IDE's

Fernando Perez fperez.net@gmail....
Tue Sep 14 14:03:49 CDT 2010


On Tue, Sep 14, 2010 at 2:20 AM, Almar Klein <almar.klein@gmail.com> wrote:
> The code that I use is quite similar to the code behind the link. (Except
> that IEP uses its own mainloop in which it periodically calls
> gtk.main_iteration().)  In addition to gtk.main() and gtk.main_quit(), I
> also replace gtk.mainloop() and gtk.mainquit() with a dummy. I suspect I did
> that to also support older versions.

yes, that's for older versions, I'm not sure if a gtk that old is
still in significant use or not.

>>> It also looks like something similar may be OK for tk, where with a
>>> bit of hijacking from our side, we can let unmodified Tk code run
>>> happily within our own environment.
>>>
>>> For Qt/Wx it definitely seems that the cooperation via guisupport will
>>> be needed.  And for fltk, I have no idea.
>>
>> I don't think there's much to do for fltk either, I'll look into it
>> tomorrow I hope.
>
> A bit later than I hoped, but here it goes:
>
> Gtk, Tk, and fltk can all be supported without cooperation via guisupport. I
> guess its all about how they define application objects, and in these
> toolkits, they're all global. On the kernel side, if integrating the event
> loop for these toolkits, you'll need to disable the mainloops. I put some
> example code below. Probably nothing new here for you guys, except maybe for
> fltk.
>
> Maybe a good idea to put examples such as these in the docs of
> guisupport.py?

Sure!  Brian is working hard on that code, so when the dust settles
we'll include this info for the others.

Thanks!

f


More information about the IPython-dev mailing list