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


Groups > comp.lang.python > #81885

Re: Python, C++ interaction

Path csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.fsmpi.rwth-aachen.de!eternal-september.org!feeder.eternal-september.org!mx02.eternal-september.org!.POSTED!not-for-mail
From Christian Gollwitzer <auriocus@gmx.de>
Newsgroups comp.lang.python
Subject Re: Python, C++ interaction
Date Thu, 04 Dec 2014 09:49:01 +0100
Organization A noiseless patient Spider
Lines 18
Message-ID <m5p753$j77$1@dont-email.me> (permalink)
References <mailman.16522.1417595824.18130.python-list@python.org>
Mime-Version 1.0
Content-Type text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding 7bit
Injection-Date Thu, 4 Dec 2014 08:48:35 +0000 (UTC)
Injection-Info mx02.eternal-september.org; posting-host="0e5522bc36df6ad040e4598fab9db9ed"; logging-data="19687"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19RJ3vhPEy4bni31mt5ibm0d+2O+WSjxwI="
User-Agent Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:24.0) Gecko/20100101 Thunderbird/24.6.0
In-Reply-To <mailman.16522.1417595824.18130.python-list@python.org>
Cancel-Lock sha1:9cgLyE2pX4W3ozAx9sosn8Bama4=
Xref csiph.com comp.lang.python:81885

Show key headers only | View raw


Am 03.12.14 09:29, schrieb Michael Kreim:
> I did some googleing on extending Python by C++ code but I did not find
> something that satisfies me. I gave SWIG a try, but several webpages
> disadvised me of using it. Also my small experiments did not work.

I don't know why SWIG is discouraged; in my experience, it is a very 
easy way to generate the wrapping code around C++ classes, and also 
flexible in many directions. It can be easily extended for new datatypes 
(there is a numpy interface module, for instance), and also generates 
code for other scripting languages as well. What specifically did you 
try, and what failed?

Concerning the callbacks, I don't know about these, but hopefully you 
are aware that you can easily loose the C++ speed advantage by using 
Python lambdas, since those have to go through the Python interpreter.

	Christian

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


Thread

Python, C++ interaction Michael Kreim <michael@perfect-kreim.de> - 2014-12-03 09:29 +0100
  Re: Python, C++ interaction Christian Gollwitzer <auriocus@gmx.de> - 2014-12-04 09:49 +0100

csiph-web