Hello List! I just started to use PyGTK and Glade to create graphical interfaces, my python interpreter version is 2.6.6; I also install the GTK2 Runtime enviroment and Glade 3.6.6. I also installed in my computer pycairo-1.8.10.win32-py2.6.exe, pygobject-2.26.0-1.win32-py2.6.exe and pygtk-2.16.0+glade.win32-py2.6.exe so my graphic application will look and work fine.
I tried to do an example in order to get familiar with this new tool, but when I run the script I got the next message: Python 2.6.6 (r266:84297, Aug 24 2010, 18:46:32) [MSC v.1500 32 bit (Intel)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> import glade1 ** Message: pygobject_register_sinkfunc is deprecated (GtkWindow) ** Message: pygobject_register_sinkfunc is deprecated (GtkInvisible) ** Message: pygobject_register_sinkfunc is deprecated (GtkObject) >>> My code is: import pygtk pygtk.require("2.0") import gtk import gtk.glade class MainWin: def __init__(self): self.widgets = gtk.glade.XML("ejemplo_glade.glade") signals = { "on_entry1_activate" : self.on_button1_clicked, "on_button1_clicked" : self.on_button1_clicked, "gtk_main_quit" : gtk.main_quit } self.widgets.signal_autoconnect(signals) self.label1 = self.widgets.get_widget("label1") self.entry1 = self.widgets.get_widget("entry1") def on_button1_clicked(self, widget): texto = self.entry1.get_text() self.label1.set_text("Hola %s" % texto) if __name__ == "__main__": MainWin() gtk.main() Does my python libraries are the correct ones for my interpreter?
_______________________________________________ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor