[IPython-dev] Uniform way of integrating event loops among different IDE's
Tue Aug 24 10:06:37 CDT 2010
Hi Fernando and others,
I'm developing an IDE for Python (http://code.google.com/p/iep/) that is
capable of integrating the event loop of several GUI toolkits. On a side
note, I used much code of IPython as inspiration on how to do that, so
thanks for that.
I saw in the IPython documentation that IPython users can detect whether
IPython hijacked the event loop as follows (for wx):
from IPython import appstart_wx
A very nifty feature indeed. However, building further on this, wouldn't it
be nice if people could perform this trick regardless of in which IDE or
shell the code is running? Therefore I propose to insert an object in the
GUI's module to indicate that the GUI event loop does not need to be
entered. I currently use for my IDE:
if not hasattr(wx, '_integratedEventLoop'):
app = wx.PySimpleApp()
Currently, _integratedEventLoop is a string with the value 'IEP', indicating
who hijacked the main loop. I'm not sure what IPythons appstart_* function
does, but the inserted object might just as well be a function that needs to
be called (using the app instance as an argument, but how to call it for
fltk or gtk then?).
I'm interested to know what you think of this idea.
PS: for PyQt4, I would propose inserting the object both in the PyQt4 and
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the IPython-dev