Closed GoogleCodeExporter closed 9 years ago
Btw I would love to help in getting the bindings working for these modules, as
long as Mark states officially what the correct & easy way to do it is.
Original comment by mkr3...@gmail.com
on 15 Apr 2012 at 9:40
unfortunately global type inference will never work with arbitrary libraries,
without some or a lot of manual work for each library.. and sometimes even that
isn't possible, because a library is too large or dynamic.
it is often possible though, and this is the preferred method of integration,
to have shedskin generate an extension module for some performance critical
piece of code, and import this into a larger program. see the shedskin example
programs for many examples of this.. (some of these use pygtk, pygame or
multiprocessing in this way).
so extension modules really are the preferred way to deal with non-standard
libraries. but if you insist, the correct way to add bindings is to add a .py
model to the lib/ dir, enough for shedskin to perform type inference, and
manual .?pp files that call into the library you want to bind. this is
actually described in the documentation ("Calling C/C++ Code"), and there are
lots of examples in lib/ already. just have a look there :-)
Original comment by mark.duf...@gmail.com
on 16 Apr 2012 at 2:33
Original issue reported on code.google.com by
mkr3...@gmail.com
on 15 Apr 2012 at 9:26