I'm attempting to use Enthought's Python [link|http://code.enthought.com/enthon/|distribution] to cobble together a least-squares fitting program. It should be trivial, right?
I found [link|http://mail.python.org/pipermail/edu-sig/2001-July/001493.html|this] little script (from July 2001) that would be perfect for my needs, if I could get it to run properly.
I'm running Win2k and have installed about a zillion packages for Python 2.3. Everything seems to be installed correctly. The Gtk examples run fine.
However, when I try to run the gtkLeastSquares.py script in IDLE - the interactive interpreter environment, I get an error:
NameError: global name 'GtkWindow' is not defined
If I change the source from:
from gtk import *
to
import gtk
and change
main_window = GtkWindow()
to
main_window = gtk.Window()
then that error no longer happens (and in fact it will up a gtk window if run with a couple of other lines of code in IDLE). Instead I get:
NameError: global name 'mainquit' is not defined
My questions:
1) Before I start changing the source very much, is there some clear indication that something is wrong with the source, or is it something with my installation? Is it a Python, or gtk.py, or other package, version issue?
2) How do I find out what the proper names of the Gtk* functions should be (i.e. GtkBlaBla() versus gtk.BlaBla())? I've been unable to figure out what file is actually loaded by the from gtk import * line (or what its source is).
Thanks a bunch.
Cheers,
Scott.