Writing Extensions for Python 3 in C

Robin Becker robin at reportlab.com
Wed Jun 19 05:06:48 EDT 2013


On 18/06/2013 11:24, Aditya Avinash wrote:
> Hi. This is the last place where I want to ask a question. I have searched
> for lots of tutorials and documentation on the web but, didn't find a
> decent one to develop extensions for Python 3 using a custom compiler
> (mingw32, nvcc). Please help me.
> PS: Don't point me to Python Documentation. It is not good for beginners.
> It doesn't elaborate about calls and implementation.
>
>
>
Try getting the source code for the Python you intend to build for. Then look in 
the Modules directory for the sample extensions xxlimited.c, xxmodule.c & 
xxsubtype.c. They may give you some idea of how to proceed. Of course all the 
other .c codes in there are the actual extensions that Python uses so they are 
also good examples.

I started with "Extending and Embedding the Python Interpreter" from the python 
documentation though.
-- 
Robin Becker




More information about the Python-list mailing list