[PyQt] Is there a way to run the interp AND a gui?

Phil Thompson phil at riverbankcomputing.com
Thu Mar 4 08:58:56 GMT 2010


On Wed, 3 Mar 2010 18:51:35 -0800 (PST), Jason H <scorp1us at yahoo.com>
wrote:
> Undoubtedly, that would work for showing the widget. And yes, I've done
> that much. Unless something has changed recently,  I eventually have to
> call app.exec_(), which would block until last window has closed...
> 
> I seems the previous email of calling eval() might be the right route.

show() doesn't display a widget - it schedules the paint of the widget for
the next iteration of the event loop. Therefore if the widget is visible
then the event loop is running. Therefore you do not need to run exec_().

Phil


More information about the PyQt mailing list