[Tutor] problems with python and glade
Alfonso
eu_alfonso at yahoo.es
Sat Jun 10 20:48:49 CEST 2006
Hi,
I'm trying to learn to use python with glade. As start I have tried to
run a program from a tutorial, but when I run it I become this
exception: class GladeXML(_gtk.GtkData): AttributeError: 'module'
object has no attribute 'GtkData'
This ist the program:
import pygtk
pygtk.require('2.0')
import gtk
import libglade
import gtk.glade
class HellowWorldGTK:
"""This is an Hello World GTK application"""
def __init__(self):
#Set the Glade file
self.gladefile = "proyecto2.glade"
self.wTree = gtk.glade.XML(self.gladefile)
#Get the Main Window, and connect the "destroy" event
self.window = self.wTree.get_widget("MainWindow")
if (self.window):
self.window.connect("destroy", gtk.main_quit)
Does anyone know what could be wrong? Thank you for your attention.
______________________________________________
LLama Gratis a cualquier PC del Mundo.
Llamadas a fijos y móviles desde 1 céntimo por minuto.
http://es.voice.yahoo.com
More information about the Tutor
mailing list