[IPython-user] gtk.main_iteration() blocks ipython

Ville M. Vainio vivainio@gmail....
Tue Apr 8 00:39:42 CDT 2008


On Tue, Apr 8, 2008 at 1:12 AM, Pieter Cristiaan de Groot
<p.c.degroot@tudelft.nl> wrote:

>  executing some loop. What function am I allowed to call inside this loop
>  to give the gui some processor time, without ipython blocking
>  afterwards? I tried gtk.main_iteration() but this blocks the shell after

Just for the sake of interest, try the latest IPython. It should not
at least hang, it just stops feeding the commands to the GUI thread
loop (MTInteractiveShell.runcode(), see Shell.py), and instead
executes them immediately, until the GUI becomes 'alive' again.

You can find the latest IPython at:

https://launchpad.net/ipython/stable/0.8.3pre

If you look at Shell.py, IPShellGtk class, you'll see that it
registers on_timer event that keeps IPython alive. For some reason,
that is probably not run after iter_mainloop()

-- 
Ville M. Vainio - vivainio.googlepages.com
blog=360.yahoo.com/villevainio - g[mail | talk]='vivainio'


More information about the IPython-user mailing list