Re: Python, C++ interaction

2014-12-07 Thread Gayathri J
Cython and number it is... they definitely rule! But of course I am also interfacing my python code (with all the structuring and UI and object orientation) with some sse and fortran. if u can get a grip of programming fortran/sse, they work too On 12/7/14, Mark Lawrence wrote: > On 07/12/2014

Re: Python, C++ interaction

2014-12-07 Thread Mark Lawrence
On 07/12/2014 15:05, Sturla Molden wrote: On 05/12/14 23:17, wesleiram...@gmail.com wrote: m'giu vous êtès nom souris, pseudo nom cha'rs out oiu êtès, i'ret egop c'hâse I have not idea what that means, but I am sure it would be interesting if I knew French (or whatever it is). Please be ca

Re: Python, C++ interaction

2014-12-07 Thread Sturla Molden
On 05/12/14 23:17, wesleiram...@gmail.com wrote: m'giu vous êtès nom souris, pseudo nom cha'rs out oiu êtès, i'ret egop c'hâse I have not idea what that means, but I am sure it would be interesting if I knew French (or whatever it is). Sturla -- https://mail.python.org/mailman/listinfo/py

Re: Python, C++ interaction

2014-12-05 Thread wesleiramos2
Em quinta-feira, 4 de dezembro de 2014 07h51min14s UTC-2, Sturla Molden escreveu: > Dan Stromberg wrote: > > > 1) writing in Cython+CPython (as opposed to wrapping C++ with Cython) > > That is an option, but it locks the code to Cython and CPython forever. C > and C++ are at least semi-portabl

Re: Python, C++ interaction

2014-12-04 Thread Sturla Molden
Dan Stromberg wrote: > 1) writing in Cython+CPython (as opposed to wrapping C++ with Cython) That is an option, but it locks the code to Cython and CPython forever. C and C++ are at least semi-portable. > 2) using numba+CPython (It's a pretty fast decorator - I've heard it's > faster than Cytho

Re: Python, C++ interaction

2014-12-04 Thread Christian Gollwitzer
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 e

Re: Python, C++ interaction

2014-12-04 Thread Jeremy Sanders
Michael Kreim wrote: > What are you using to wrap C++ classes for Python? I'm using SIP, as it fits nicely with my PyQt user interface. http://www.riverbankcomputing.com/software/sip/intro It's a pretty flexible and fast way of wrapping C++ and C. If you want to pass numpy arrays and such, it

Re: Python, C++ interaction

2014-12-03 Thread Dan Stromberg
On Wed, Dec 3, 2014 at 12:29 AM, Michael Kreim wrote: > Hi, > 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. Now, I > read about cty

Re: Python, C++ interaction

2014-12-03 Thread Joshua Landau
On 3 December 2014 at 08:29, Michael Kreim wrote: > > What are you using to wrap C++ classes for Python? > Can you recommend swig? Should I give it another try? > Did I misunderstood ctypes? The PyPy guys would love it if you used CFFI. Cython is also a wonderful approach. There's a lot of suppor

Re: Python, C++ interaction

2014-12-03 Thread Sturla Molden
Cython is nearly always the answer to scientific computing in Python, including wrapping C++. Sturla Michael Kreim wrote: > Hi, > > we are working on a small scientific program that helps us in developing > and testing of new numerical methods for a certain type of biochemical > problems. I

Python, C++ interaction

2014-12-03 Thread Michael Kreim
Hi, we are working on a small scientific program that helps us in developing and testing of new numerical methods for a certain type of biochemical problems. I spare you the math ;-) We code our new methods in Python and compare them with the existing methods. Unfortunately, these existing m