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

Path csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.freenet.ag!news2.euro.net!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail
Return-Path <python-python-list@m.gmane.org>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.004
X-Spam-Evidence '*H*': 0.99; '*S*': 0.00; 'subject:Python': 0.06; 'compiler': 0.07; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'python': 0.11; 'question.': 0.14; 'received:80.91.229.3': 0.16; 'received:plane.gmane.org': 0.16; 'subject:Writing': 0.16; 'extensions': 0.16; 'wrote:': 0.18; 'header:User-Agent:1': 0.23; 'source': 0.25; 'tutorials': 0.26; 'header:X-Complaints-To:1': 0.27; 'header:In-Reply-To:1': 0.27; 'idea': 0.28; 'point': 0.28; "doesn't": 0.30; 'code': 0.31; 'getting': 0.31; 'embedding': 0.31; 'though.': 0.31; 'actual': 0.34; 'there': 0.35; "didn't": 0.36; 'to:addr:python-list': 0.38; 'to:addr:python.org': 0.39; 'received:org': 0.40; 'how': 0.40; 'course': 0.61; 'sample': 0.67; 'received:109': 0.72; 'examples.': 0.84
X-Injected-Via-Gmane http://gmane.org/
To python-list@python.org
From Robin Becker <robin@reportlab.com>
Subject Re: Writing Extensions for Python 3 in C
Date Wed, 19 Jun 2013 10:06:48 +0100
References <CABocMVoYuaL=onFJ6RJH2PzVMFE2bj5mApmq04fN42_a_8so6w@mail.gmail.com>
Mime-Version 1.0
Content-Type text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding 7bit
X-Gmane-NNTP-Posting-Host 109.174.168.73
User-Agent Mozilla/5.0 (Windows NT 5.1; rv:17.0) Gecko/20130509 Thunderbird/17.0.6
In-Reply-To <CABocMVoYuaL=onFJ6RJH2PzVMFE2bj5mApmq04fN42_a_8so6w@mail.gmail.com>
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.15
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <http://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.3577.1371632828.3114.python-list@python.org> (permalink)
Lines 21
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1371632828 news.xs4all.nl 15947 [2001:888:2000:d::a6]:34314
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:48701

Show key headers only | 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