Pyrex without Python (was Re: calling Pyrex results from C)

François Pinard pinard at iro.umontreal.ca
Wed Jan 21 04:15:18 CET 2004


[Paul Prescod]
> Jeff Epler wrote:

> >How close to impossible would it be to make Pyrex emit Python-free code
> >if there are only 'cdefs'? 

> It will generate a bunch of Python module crap. You could extract the 
> pure-C code from the middle of it.

Or just provide a module containing many stub routines.

> I really don't see much benefit to using Pyrex if even _C_'s standard
> memory management is too extravagant for your needs. What exactly
> would Pyrex buy you if you can't afford to use its high-level features
> like memory management, constructors and OO?

The pleasure of Python-like syntax, of course.

Maybe the fact that one can build and debug prototypes in Python, with
the agenda of later transforming them into C, somehow, without rewriting
so much of them, for environments where the whole of Python, for various
reasons, is not welcome.

-- 
François Pinard   http://www.iro.umontreal.ca/~pinard




More information about the Python-list mailing list