[Pyrex] ANN: pyrexembed - Pyrex C++ wrapping kit

David McNab david at rebirthing.co.nz
Tue Nov 8 20:44:28 CET 2005


Lenard Lindstrom wrote:
> Pyrex already handles many aspects of C++. Here is the web site 
> example written in pure Pyrex:

ehh? where on the website is that?

> cdef extern from "MyClass.h":
8><

I assume this requires the C++ patch.

Anyway, after sleeping on pyrexembed, I'm now seeing that it could be
used as a convenience system when wrapping plain C as well, since it
eliminates the need to write and maintain 'cdef extern from' and
'ctypedef' blocks.

If I get a chance this evening, I'll update pyrexembed to allow users to
specify generation of pure-C layer generation (with default staying as C++).

> Of course 'pyrexembed' could simplify things when C++ exception traps 
> must be written. I'm still not sure how best to do this.

It does give a mechanism making it easy for users to access all of C++'s
features, so until Pyrex gets full C++ support, pyrexembed will have
some usefulness.

Cheers
David

> 
> Lenard Lindstrom
> <len-l at telus.net>
> 
> On 8 Nov 2005 at 18:36, David McNab wrote:
> 
> 
>>Hi all,
>>
>>Since Greg's commitments don't allow for him to implement C++ support in
>>Pyrex any time soon, I've created an interim solution.
>>
>>It's called 'pyrexembed', a mechanism that allows you to embed C++ code
>>directly into your Pyrex files, and end up with extensions that compile
>>and work as expected.
>>
>>All is revealed on the website and in the tarball:
>>
>>   http://www.freenet.org.nz/python/pyrexembed
>>
>>Have fun with it.
>>
>>Patches, bug reports, feature requests, n-figure donations etc - all
>>welcome, you've got my email.
> 
> 
> 
> _______________________________________________
> Pyrex mailing list
> Pyrex at lists.copyleft.no
> http://lists.copyleft.no/mailman/listinfo/pyrex
> 
> 



More information about the Pyrex mailing list