Comment 4 for bug 270856

Revision history for this message
Ville M. Vainio (villemvainio) wrote : Re: [Bug 270856] Re: IPython hangs with PyGTK

On Tue, Sep 16, 2008 at 5:11 PM, Michiel de Hoon <email address hidden> wrote:

>> Could it be used to avoid launching a thread for gtk event loop (which
> is possible with tk and qt4)?
>
> You mean if gtk.set_interactive(False) could interfere with launching a thread for the gtk event loop?
> No, it cannot. In brief,
>>>> import gtk; gtk.set_interactive(False)
> with the new PyGTK is identical to
>>>> import gtk
> with the old PyGTK.
>
> I have tried this patch with ipython with the new PyGTK. With this
> patch,
>
> ipython -gthread
>>>> import gtk
>>>> w = gtk.Window()
>>>> w.show()
>
> opens an interactive gtk window as it should. Without the patch, ipython
> hangs after the "import gtk".

I am not questioning your patch - rather, I'm thinking that if we
leave in the interactive event loop, we can make ipython interface
with gtk in a single threaded (read: robust and simple) fashion, just
like it does with tk.

This is definitely something that should be investigated.

--
Ville M. Vainio
http://tinyurl.com/vainio