Use Python library from C++

Robert Kern rkern at ucsd.edu
Thu Nov 25 12:37:43 EST 2004


Chang LI wrote:
> "Chris S." <chrisks at NOSPAM.udel.edu> wrote in message news:<ukgpd.12554$Vy.6850 at trndny06>...
> 
>>zhao wrote:
>>
>>
>>>Try boost.python and SWIG?
>>>(boost.sourceforge.net, swig.sourceforge.net)
>>>
>>>Both provide a interface between C/C++ and python
>>>if you want gui under python, you also can try wxpython or pygtk
>>
>>I thought SWIG ported C/C++ libraries to Perl, Python, Ruby, Tcl, etc? 
>>How would you use it to port Python into C/C++?
>>
> 
> 
> SWIG is for Python to use C++. I am searching for in reverse.

Elmer is the reverse of SWIG, and should be easier to use than using the 
Python C API itself. Elmer will handle the conversion of types between 
Python and C++ and will expose a nice API on the C++ side.

-- 
Robert Kern
rkern at ucsd.edu

"In the fields of hell where the grass grows high
  Are the graves of dreams allowed to die."
   -- Richard Harter



More information about the Python-list mailing list