[Pyrex] Extension types

Grant McDonald gmcdonald at infocomp.com
Thu Sep 22 02:16:19 CEST 2005


Lenard Lindstrom wrote:

> Swig is for wrapping existing C libraries with as little fuss as possible.
The interfaces 
> it generates can be customized if you are willing to spend the time
studying the 
> documentation.

> Pyrex is for writing extension modules from scratch, though naturally it
can also be 
> used to create wrappers. But I would try writing the module in pure Python
if 
> possible and only make it an extension module if performation or memory is
an 
> issue.

On this point I don't agree. I have written several wrappers for python in
pyrex for existing c libraries and also tried to do the same in swig. I
always came up against a brick wall in relation to callbacks. Where pyrex
really shines is in allowing you to mix python and c-like syntax to achieve
the needed symbiosis. I don't believe swig can ever be a 'quick and dirty'
approach.

Grant M.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.copyleft.no/pipermail/pyrex/attachments/20050922/24752e71/attachment.html


More information about the Pyrex mailing list