[Python-Dev] Event loops, PyOS_InputHook, and Tkinter

Fernando Perez fperez.net at gmail.com
Mon Nov 14 02:30:53 CET 2005


Michiel Jan Laurens de Hoon wrote:

> For an extension module such as
> PyGtk, the developers may decide that PyGtk is likely to be run in
> non-interactive mode only, for which the PyGtk mainloop is sufficient.

Did you read my reply? ipython, based on code.py, implements a few simple
threading tricks (they _are_ simple, since I know next to nothing about
threading) and gives you interactive use of PyGTK, WXPython and PyQt
applications in a manner similar to Tkinter.  Meaning, you can from the command
line make a window, change its title, add buttons to it, etc, all the while
your interactive prompt remains responsive as well as the GUI.  With that
support, matplotlib can be used to do scientific plotting with any of these
toolkits and no blocking of any kind (cross-thread signal handling is another
story, but you didn't ask about that).

As I said, there may be something in your problem that I don't understand.  But
it is certainly possible, today, to have a non-blocking Qt/WX/GTK-based
scientific plotting application with interactive input.  The ipython/matplotlib
combo has done precisely that for over a year (well, Qt support was added this
April).

Cheers,

f



More information about the Python-Dev mailing list