Glue code

Thomas Heller theller at python.net
Fri Jun 13 10:44:48 EDT 2003


DB_RobertP <member31018 at dbforums.com> writes:

> What systems do people use to easily make C/C++ code visible to Python?
> I'm currently checking out Swig, but I've heard others mentioned. If
> anyone has any experience with these systems, could you recommend one to
> look into? Also, any other general pointers when trying to extend C/C++
> code to python sctipts would be greatly appreciated.
> Thanks!
> Robert

If your C code is contained in a shared library (unix) or dll (windows),
ctypes may be the easiest way to access it from Python. You can write
the Python wrapper in pure Python.

http://starship.python.net/crew/theller/ctypes/

Thomas




More information about the Python-list mailing list