[SciPy-user] New implementation for gui_thread
Pearu Peterson
pearu at scipy.org
Thu Oct 9 21:39:05 EDT 2003
Hi,
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()
etc.
Also scipy.plt works:
>>> from gui_thread import wxPython_thread; wxPython_thread()
>>> from scipy.plt import *
>>> f=figure()
>>> p=plot([1,2])
etc.
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.
Enjoy,
Pearu
More information about the SciPy-User
mailing list