--- Begin Message ---
Hi,
I've been pulling my hair out for a week on this and I think I have discovered 
a problem when using Numarray with PyGTK.  Below I have taken the filesel.py
demo from the PyGTK tutorial and added two lines, one that imports the Numarray
package and another that creates a numarray.  Adding these two lines makes 
the program crash with a Floating Point Exception on my machine.  Could 
someone please cut and paste the following and let me know if they have the 
same problem?
I have:
numarray .9
pygtk 2.0.0-r1
gtk+ 2.2.4-r1
python 2.3.3

Thanks,
Ross
-----------------------------------------------------------------
#!/usr/bin/env python

# example filesel.py

import gtk
import numarray

class FileSelectionExample:
    # Get the selected filename and print it to the console
    def file_ok_sel(self, w):
        print "%s" % self.filew.get_filename()

    def destroy(self, widget):
        gtk.mainquit()

    def __init__(self):
        # Create a new file selection widget
        self.filew = gtk.FileSelection("File selection")

        self.filew.connect("destroy", self.destroy)
        # Connect the ok_button to file_ok_sel method
        self.filew.ok_button.connect("clicked", self.file_ok_sel)

        # Connect the cancel_button to destroy the widget
        self.filew.cancel_button.connect("clicked",
                                         lambda w: self.filew.destroy())

        # Lets set the filename, as if this were a save dialog,
        # and we are giving a default filename
        self.filew.set_filename("penguin.png")

        self.filew.show()

def main():
    a = numarray.ones(1000)
    gtk.main()
    return 0

if __name__ == "__main__":
    FileSelectionExample()
    main()

--- End Message ---
_______________________________________________
pygtk mailing list   [EMAIL PROTECTED]
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/

Reply via email to