Python Binding

Georg Grabler ggrabler at gmail.com
Sat May 5 15:45:20 EDT 2007


Hello everybody.

There's a C library which i'd like to have python bindings for. I havn't
known anything before about how to write python bindings for a C library.

I succeeded now by using distutils to write the first bindings for functions
and similar.

Now, it seems as something is blocking my brain. For the library, i
need "custom" types, so types defined in this library (structures),
including pointers and similar.

I've been thinking about what i will need to represent this lists in python.
I thought about creating an external python object, providing "information"
i get from the list in C structures which can be converted.

Basically, it are list of packages, which have several attributes (next,
prev, etc). But i don't know how to supply a proper list from the binding /
object written in C.

Any suggestions or hints about this?

Thank you,
Georg



More information about the Python-list mailing list