C wrapper

Gabriel Genellina gagsl-py at yahoo.com.ar
Tue Nov 7 23:09:32 CET 2006

At Tuesday 7/11/2006 17:43, Sheldon wrote:

> > And what are those non-static functions used for? The *only* purpose
> > of your module should be to provide the Python bindings...
>I wrote the C module to do some number crunching. Now I just need to
>"connect" it to my python program. Should the initmsgpps_functions() be
>the only function in the file? Then how do I "connect" my C module to
>my Python program?

Read again the docs but have in mind that you are *extending* the 
interpreter with a new module - disregard the references to 
*embedding* Python (even if they appear in a section about 
extending!). I can see your confusion reading 

That is, you *don't* write a main() function, and you *don't* invoke 
Py_Initialize; just write your initXXX() function.

Gabriel Genellina
Softlab SRL 

Correo Yahoo!
Espacio para todos tus mensajes, antivirus y antispam ¡gratis! 
¡Abrí tu cuenta ya! - http://correo.yahoo.com.ar

More information about the Python-list mailing list