Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #48701

Re: Writing Extensions for Python 3 in C

From Robin Becker <robin@reportlab.com>
Subject Re: Writing Extensions for Python 3 in C
Date 2013-06-19 10:06 +0100
References <CABocMVoYuaL=onFJ6RJH2PzVMFE2bj5mApmq04fN42_a_8so6w@mail.gmail.com>
Newsgroups comp.lang.python
Message-ID <mailman.3577.1371632828.3114.python-list@python.org> (permalink)

Show all headers | View raw


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

Back to comp.lang.python | Previous | Next | Find similar | Unroll thread


Thread

Re: Writing Extensions for Python 3 in C Robin Becker <robin@reportlab.com> - 2013-06-19 10:06 +0100

csiph-web