On Wed, Jul 04, 2007 at 08:07:31AM +0100, Michael Sheldon wrote:
> Hi,
>
> I'm attempting to write some python bindings for libempathy using
> pygtk-codegen-2.0. However, if I build the bindings against python 2.5
> I get the following error when importing them:
>
> >>> import pyempathy
>
> ** (process:6982): WARNING **: couldn't make the type
> `pyempathy.ContactManager' ready
> TypeError: mro() returned base with unsuitable layout
> ('pyempathy.ContactList')
>
> ** (process:6982): WARNING **: couldn't make the type
> `pyempathy.TpContactList' ready
> TypeError: mro() returned base with unsuitable layout
> ('pyempathy.ContactList')
>
> Fatal Python error: can't initialise module pyempathy
> Aborted
>
> However under python 2.4 they work correctly. I understand that this is
> perhaps a problem with the way in which pygtk-codegen-2.0 handles gobject
> interfaces (pyempathy.ContactList is an interface). What's the correct
> way for me to wrap gobject interfaces?
Nevermind, managed to work it out in the end. For anyone else with a similar
problem the solution is that because h2def.py doesn't detect if something is
an interface you need to modify the def to use "define-interface" instead of
"define-object".
Cheers,
Mike.
--
Michael Sheldon
http://www.mikeasoft.com
_______________________________________________
pygtk mailing list [email protected]
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/