[SciPy-dev] gui_thread issue

Prabhu Ramachandran prabhu_r at users.sf.net
Sun Nov 7 12:51:04 EST 2004


>>>>> "PP" == Pearu Peterson <pearu at scipy.org> writes:

    PP> On Sat, 6 Nov 2004, Fernando Perez wrote:
[...]
    PP> So, gui_thread seems to remain a troublesome module in scipy..

First, to answer Eric's question, I never seem to run into problems
with gui_thread starting.  gui_thread is supposed to block when it
starts thanks to `pexec`.  Atleast this is what it does for me under
Linux.

My experience with gui_thread is much better than Pearu's.  I happen
to use gui_thread pretty regularly with 2.5.2.8 under Linux without
any of these problems.  I have a simple `ipythonrc-gt` that merely
imports gui_thread and starts the thread.  There are occasional
problems with the Python session hanging on exit (Ctrl-C exits cleanly
though) but none when running code.  This is on a Debian sarge box
with Python-2.3.4.  I built wxPython-2.5.2.8 from source.

I suspect that there is one hack that I applied that only fixes a
2.5.x related problem that is driving 2.4.x users up the wall.  Could
you please try this out and see if things improve?

In gui_thread/wxBackgroundApp.py
 
     94         ExecThread(cmd,globals(),locals())
     95         finished.wait(0.5)

Change line 95 to this:

     95         finished.wait()

Please see if it helps when you are using 2.4.x.  With 2.5.x, this
seems to make all the difference.  So if it fixes Pearu's problem, we
cn work out a solution that satisfies everyone.

Thanks!

cheers,
prabhu




More information about the SciPy-Dev mailing list