wrapping C functions in python

Diez B. Roggisch deets at nospam.web.de
Thu Apr 10 03:51:57 EDT 2008


Paul Anton Letnes schrieb:
> Brian and Diez:
> 
> First of all, thanks for the advice.
> 
> Brian:
> 
> I have installed NumPy and SciPy, but I can't seem to find a wavelet 
> transform there.
> 
> The main point of this was more to learn C wrapping than to actually get 
> a calculation done. I will probably be starting a PhD soon, doing really 
> heavy computations. If I want to manipulate data (input / results), 
> python is very nice, especially with gnuplot-py. However, heavy 
> calculations should probably be done in C(++), especially as some code 
> for this already exists.
> 
> I will look into SWIG.
> 
> 
> Diez:
> 
> I will look into it. Do you know a good tutorial for this? I found the 
> "standard" tutorial on C extensions, 
> http://www.python.org/doc/ext/intro.html , but as I mentioned, it seems 
> to be a bit complicated to wrap heavy data structures like arrays.

ctypes is documented as part of the python 2.5 standard lib 
documentation. And google helps as always.

diez



More information about the Python-list mailing list