Hello, I have been having a problem since upgrading IPython. I don't remember exactly which version I had before, but now it's 0.8.4.<br><br>Consider the following script:<br><br><div style="margin-left: 40px;"><span style="font-family: courier new,monospace;">import gtk</span><br style="font-family: courier new,monospace;">
<br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">win = gtk.Window()</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">win.show()</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">bt = gtk.Button("Hello")</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">bt.show()</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">win.add(bt)</span><br style="font-family: courier new,monospace;"><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">print "begin"</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">gtk.main()</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">print "end"</span><br style="font-family: courier new,monospace;">
<br style="font-family: courier new,monospace;"></div><br>In IPython 0.8.4, the gtk.main() call will immediately return and IPython re-runs a new gtk.main(), possibly in a different thread. In a previous version (sorry, don't remember which) my own gtk.main() call would not exit, it would just run the GUI. I was sure that, when gtk.main() returned it was because the window had been closed.<br>
<br>Now I am unsure how to make it work again. I have module function that is supposed to "run the GUI and don't return until everything is finished". Any advice on how to accomplish this without breaking the simple module API that I provide? Is there something like, IPython.wait_until_gui_is_finished() ?<br clear="all">
<br>-- <br>Gustavo J. A. M. Carneiro<br>INESC Porto, Telecommunications and Multimedia Unit<br>"The universe is always one step beyond logic." -- Frank Herbert<br>