Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!1.eu.feeder.erje.net!news.mb-net.net!open-news-network.org!aioe.org!.POSTED!not-for-mail From: "garyr" Newsgroups: comp.lang.python Subject: Re: Building an extension module with SWIG Date: Sat, 30 May 2015 15:55:07 -0700 Organization: Aioe.org NNTP Server Lines: 29 Message-ID: References: NNTP-Posting-Host: A1UWjsljkK3uM2306mqAKQ.user.speranza.aioe.org X-Complaints-To: abuse@aioe.org X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6157 X-RFC2646: Format=Flowed; Original X-EsetScannerBuild: 24099 X-Notice: Filtered by postfilter v. 0.8.2 X-Newsreader: Microsoft Outlook Express 6.00.2900.5931 X-EsetId: 79D7243F023D20342B9B74 X-Priority: 3 X-MSMail-Priority: Normal Xref: csiph.com comp.lang.python:91548 "garyr" wrote in message news:mkd7nk$isi$1@speranza.aioe.org... > *snip* > >> Compile it ("cythonize -b foo.pyx") and you'll get an extension module >> that >> executes faster than what SWIG would give you and keeps everything in one >> file to improve readability. >> >> Stefan >> >> >> [1] http://cython.org/ >> >> > Thanks for your reply. My interest is not in computing the gcd but to > learn > how build an extension module. I have some much more complicated C code I > wish to use. > > > Thanks for your reply. I'm using the compiler that came with Anaconda Python 2.7. I too used SWIG a bunch of years ago but it has changed a lot since then; e.g., it is now included in the Python distribution.