Using a static library in a C extension for Python

88888 Dihedral dihedral88888 at gmail.com
Thu Jan 23 07:21:08 EST 2014


On Thursday, January 23, 2014 3:22:52 AM UTC+8, lgabiot wrote:
> Le 22/01/14 18:31, 88888 Dihedral a écrit :
> 
> 
> 
> >
> 
> > Check the  C source code generated
> 
> > by Pyrex and check cython for what u
> 
> > want, but I did try that out in any
> 
> > mobile phone or flat panel
> 
> > programming.
> 
> >
> 
> 
> 
> Thanks a lot for your answer.
> 
> 
> 
> I didn't use Pyrex or other tool, but wrote myself the C python 
> 
> wrapping, using the Python C/API documentation 
> 
> (http://docs.python.org/2/c-api/). I then used the distutils tool (via a 
> 
> setup.py file) to build my extension.
> 
> While there is several function in my C code, only one needed to be 
> 
> accessed by python.
> 
> 
> 
> I'll check Cython then, but is there any tweaking of the setup.py file 
> 
> using distutils that will help me compile the extension with the cairo 
> 
> lib embedded into it?

There are some design concerns in 
writing  python scripts that might
be modified for fast execution speeds in some platforms.

Well, reducing basic operation 
overheads in well factored critical 
parts does help in getting the 
desired results faster.

 



More information about the Python-list mailing list