[IPython-dev] GUI support: conflicts between IPython 0.11 and Matplotlib/ETS

Hans Meine hans_meine at gmx.net
Wed Feb 10 03:26:14 EST 2010


On Mittwoch 10 Februar 2010, Brian Granger wrote:
> When a GUI program is used interactively within IPython, the event loop of
> the GUI should *not* be started. This is because, the PyOS_Inputhook itself
> is responsible for iterating the GUI event loop.

From a user's perspective (i.e. not from an MPL/ETS point of view), the above 
also rings bells: I am used to running GUI apps from within ipython, where 
(with older IPython versions) I'll get at most an exception from running 
sys.exit(), but my main window pops up and the app is running while I still 
have the interpreter available.  That's an incredibly important use case to 
me.

Now if the mainloop must not be started with 0.11, how about monkey-patching 
the application classes (i.e. QCoreApplication.exec_) in order to allow 
running unpatched programs when the GUI toolkit integration is active?

(In fact, in our own Qt3-based python terminal, we had monkeypatched 
QApplication in order to also ignore the creation of a second app object.)

-- 
Ciao, /  /                                                    .o.
     /--/                                                     ..o
    /  / ANS                                                  ooo
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20100210/fd70da8c/attachment.sig>


More information about the IPython-dev mailing list