Red Hat 9, Python and Glade - a mixure not working?

Hans Deragon hans at deragon.biz
Sat Jul 5 17:24:26 CEST 2003


Greetings.


  Total newbie to Glade here.  I created an interface using glade-2
and I want to use it with my python program.  Following is what I
wrote (test prg):

-------------------------
#!/usr/bin/python

import gtk
import gtk.glade
import sys

def on_button4_clicked(source=None, event=None):
  sys.exit();

gtk.glade.XML('project3.glade')
xml.autoconnect({
  'on_button4_clicked': on_button4_clicked
})

gtk.main()
-------------------------

  Now when I am running it, I get the following error:

-------------------------
(run2.py:11714): GLib-GObject-CRITICAL **: file gobject.c: line 1002
(g_object_get): assertion `G_IS_OBJECT (object)' failed

(run2.py:11714): GLib-GObject-CRITICAL **: file gobject.c: line 1002
(g_object_get): assertion `G_IS_OBJECT (object)' failed
Erreur de segmentation
-------------------------

  I am running redhat 9 with the lastest updates and glade-2.  Anybody
has a clue how to get it running?  Is there a python program that
comes in one of RH 9 packages that makes use of glade?  I could use it
as an example.


Regards,
Hans Deragon




More information about the Python-list mailing list