Mixing Python and C: any easy way?

John Hunter jdhunter at ace.bsd.uchicago.edu
Thu Jan 16 17:50:52 CET 2003

>>>>> "Alan" == Alan James Salmoni <alan_salmoni at yahoo.com> writes:

    >> 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?

Other's have suggested boost::python, which I 2nd, since you have a
lot of C++ experience.

There is a new open source tool called CABLE by kitware which promises
automatic extension building of C++ code using gcc's internal parser.
Right now they only support extensions in tcl, but python and other
languages are supposed to be soon forthcoming.  These guys have
extensive experience writing python extensions with for their VTK.


There is also a recent article on CABLE in the Jan issue of C/C++
Users Journal.

John Hunter

More information about the Python-list mailing list