[Ilugc] re: building python extension
Sudharshan S
sudharsh at gmail.com
Thu May 21 11:15:24 IST 2009
On Thursday 21 May 2009 02:10:09 Ravi Jaya wrote:
> Luggies,
>
>
> I am trying to build Python extension using C in windows and Linux, can
> someone please provide me an a pointer for the same.
>
> http://docs.python.org/3.0/extending/extending.html
>
> I am tried to in windows, it shows some error message which i had pasted
> it here http://pastebin.com/m370edfc
From the error messages, it looks like you don't have the headers installed.
Try installing the development packages for libc6.
As with the python extensions, use Cython[1] or Pyrex[2] to write extensions
since using the CPython API involves a lot of boring boiler-plate code (also
gets complicated in a while). If the extension is binding a simple library,
you can use ctypes[3] module provided by the python standard library.
I personally found Cython to be pretty easy to use.
[1]: http://www.cython.org/
[2]: http://www.cosc.canterbury.ac.nz/greg.ewing/python/Pyrex/
[3]: http://python.net/crew/theller/ctypes/
--
Regards
Sudharshan S
Blog : http://www.sudharsh.wordpress.com
IRC : Sup3rkiddo @ Freenode, Gimpnet
More information about the ilugc
mailing list