views:

19

answers:

1

I'm looking for up-to-date documentation and tutorials on creating Python bindings for gobjects. Everything I can find on the web is either incomplete or out of date.

A: 

gobject's aren't special - the standard Python documentation is what you want. Check out the Extending and Embedding Tutorial (at least the "Extending" parts), and then keep a copy of the Python/C API in your back pocket.

Also, Google Code Search is generally your friend when the tutorials don't have examples of what you want to do.

Nick Bastin
Are you sure they aren't special? The whole point of gobject is to make bindings easy for languages like Python.... According to http://pygabriel.wordpress.com/2009/07/22/wrapping-gobjects-for-pygtk/ there are code-generation tools that do most of the work. I'm mostly just wanting more complete documentation of that.
Matthew Talbert
They're merely an abstraction in the source language that makes interoperability a little easier, but the mechanics of actually wrapping them in another language are defined by that language, not the gobject.
Nick Bastin
Also, yes, there are code generation tools that do most of the work. However, they don't do *all* of the work, and this matters to you. If you never wrap one by hand, understanding the target language mechanisms for extending, then you'll tear your hair out trying to fill in the gaps that your code generation tools left you.
Nick Bastin