[pygtk] Using GInterfaces ...

Roberto Majadas roberto.majadas at openshine.com
Mon Aug 3 21:09:27 WST 2009


Hi people :

I'm trying to use GInterfaces in python. But i've this Warning 

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

import gobject

class IP (gobject.GInterface):
    def __init__(self):
	pass

    def get_preferences_widget(self) :
        print self.name

class General (gobject.GObject, IP ) :
    __gtype_name__ = 'General'

    def __init__(self):
        gobject.GObject.__init__(self)
	IP.__init__(self)
	self.name = "General"

---------------------------

The warning ---------------

/var/lib/python-support/python2.6/gtk-2.0/gobject/__init__.py:121:
RuntimeWarning: Interface type IP has no Python implementation support
  type_register(cls, namespace.get('__gtype_name__'))
---------------------------

I can to instance the General class and to use the interface method's , but
i'm not really sure if this warning will cause me any problem in the
future.

Comments ?

telemaco




More information about the pygtk mailing list