Mixing Python and C: any easy way?

jsaul jsaul at gmx.de
Thu Jan 16 04:14:07 EST 2003


* Carl Bevil [2003-01-16 05:15]:
> Am I overreacting here?  And is there a better way to do this?  If not SWIG,
> then what can do this task?  Am I asking for the impossible?  I've heard that
> Python is supposed to be good at interfacing with C/C++.  Can someone give me
> some pointers that will help me out here?

Remember that you don't need any extra tool at all to create the
necessary wrappers; just code them manually. I myself wanted to
use SWIG & Co. right from the beginning; but found it difficult
without having coded wrappers myself previously. Now I find that
a much better approach is to first code a number of wrappers
manually, which in most cases follows the same scheme. Only then
you will be able to fully understand and appreciate how SWIG
works. You might even find that the manual approach suits your
needs better.

Gruß, jsaul
-- 
Que le gusta rrrodarrr la errre.




More information about the Python-list mailing list