[SciPy-dev] gui_thread issue

Fernando Perez Fernando.Perez at colorado.edu
Thu Nov 4 16:29:02 CST 2004


Peter Wang schrieb:
> Hey guys,
> 
> I'm running into a problem with gui_thread on wxPython 2.4.1.2 and 
> python 2.3.4 running on win32.  The following lines will crash the 
> interpreter, ipython, or PythonWin (although IDLE seems to survive with 
> a big "RESTART" line):
> 
>  >>> from gui_thread import examples
>  >>> examples.non_modal_sample()
> 
> This appears to be the case with both the gui_thread that ships with the 
> latest Enthought distribution as well as the latest version from CVS.
> 
> Any ideas?  Is this a known issue?

It may have something to do with win32. Under Fedora Core 2, with python 2.3.3 
and wX 2.4.2.4, this is what I get (in ipython):

n [1]: from gui_thread import examples

In [2]: examples.non_modal_sample()
Out[2]: <gui_thread.examples.SimpleFrame instance; proxy of C++ wxFrame 
instance at _9973098_wxFrame_p>

In [3]:

No window pops up, so I'm not sure if that's the expected behavior.  However, 
if I try to start gui_thread first, I do get bizarre behaviour:

In [1]: import gui_thread

In [2]: gui_thread.start()

In [3]: gui_thread.examples.non_modal_sample()
---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)

/home/fperez/<console>

AttributeError: 'module' object has no attribute 'examples'

In [4]: from gui_thread import examples
---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)

/home/fperez/<console>

/home/fperez/gui_thread/examples.py

/home/fperez/gui_thread/examples.py in SimpleFrame()

/usr/lib/python2.3/site-packages/wxPython/misc.py in __init__(self, *_args, 
**_kwargs)
     102 class wxSize(wxSizePtr):
     103     def __init__(self,*_args,**_kwargs):
--> 104         self.this = miscc.new_wxSize(*_args,**_kwargs)
     105         self.thisown = 1
     106

/home/fperez/<string> in new_wxSize(*args, **kws)

AttributeError: AttrHolder instance has no attribute 'result'

In [5]:  ### Hit Ctrl-D here to try to exit
Exception exceptions.AttributeError: <exceptions.AttributeError instance at 
0x5502d04c> in

At the end, I had to Ctrl-C to kill things, because the shell just hung at the 
above error message and would just not exit.

This doesn't provide any soultion, just more info for those who understand 
gui_thread to perhaps help pin the problem.

Best,

f




More information about the Scipy-dev mailing list