[vtkusers] VTK & wxPython & Numarray

rharder at uiuc.edu rharder at uiuc.edu
Thu Jun 3 19:54:18 EDT 2004


Hi, 
I am hoping to use all of them together, but I have run into a problem
just using Numarray and wxPython together.
Here is a short example that crashes for me:
numarray .9
wxpython 2.4.0.7
wxgtk 2.4.1-r1
python 2.3.3

If I comment out either the numarray assignment or the wxScrolledWindow
It will run fine.  If both are left in I get a floating point exception
from the frame.Show() command.  Has anyone run into this before?

Ross

---------------------------------------------------------------
from wxPython.wx import *
import numarray 

app = wxPySimpleApp()

np = numarray.ones(10000)

class MyFrame(wxFrame):
  def __init__(self, parent, ID, title):
        wxFrame.__init__(self, parent, ID, title,
                        wxDefaultPosition, wxSize(512,512))

        self.imagewindow = wxScrolledWindow(id=-1, name='imagewindow',
                parent=self, pos=wxDefaultPosition, size=wxDefaultSize,
                style=wxHSCROLL|wxVSCROLL)


frame=MyFrame(NULL,-1, "wxVizWindow")
print "I am"
frame.Show(true)
print "an idiot"
app.MainLoop()



More information about the vtkusers mailing list