[Tutor] Using C in python
Chris Fuller
cfuller084 at thinkingplanet.net
Wed Mar 25 20:34:03 CET 2009
There's a section in the Python docs just on this topic:
http://docs.python.org/extending/index.html
There's probably also some stuff in the wiki, although I'm not familiar with
anything specific: http://wiki.python.org/moin/
The SWIG documentation is extensive, and while not the user-friendliest,
should get you started: http://www.swig.org/doc.html
The quick intro to SWIG is that you create and "interface file" which defines
how Python interfaces to your C code. In the braindead simple cases, this
can be simply the header files with your function prototypes. In actual
usage, it's a good deal more complicated, but the SWIG docs show you the way.
Cheers
On Wednesday 25 March 2009 16:13, amit sethi wrote:
> what are the ways in which i can use C in python programs . I know there is
> SWIG bindings are there any other . Also Could anyone explain how Swig
> bindings work?
More information about the Tutor
mailing list