[SciPy-dev] New implementation for gui_thread

Pearu Peterson pearu at scipy.org
Thu Oct 9 20:39:05 CDT 2003


I have succesfully finished implementing new hooks for importing
wxPython to its own thread. The working idea is that all wxPython
extension modules (that contain only low-level functions) are 
transparently replaced with wrappers that direct wx execution
to a different thread so that Python prompt will be available
for interactive work even when a wxPython application is running.

As an example, here follows how to use chaco from Python prompt:

# update scipy from CVS
>>> from gui_thread import wxPython_thread; wxPython_thread()
>>> from chaco.wxplt import *
>>> f=figure()
>>> p=plot([1,2])
>>> close()

Also scipy.plt works:

>>> from gui_thread import wxPython_thread; wxPython_thread()
>>> from scipy.plt import *
>>> f=figure()
>>> p=plot([1,2])

If there will be no serious problems then I'll replace wxPython_thread 
function with start so that the above examples become:

>>> import gui_thread; gui_thread.start()
>>> ...

It would be great if someone could test the above also on Windows.


More information about the Scipy-dev mailing list