[Pyrex] Should Pyrex be in standard Python?

Andreas Kostyrka andreas at mtg.co.at
Fri Jan 30 01:54:23 CET 2004


Am Do, den 22.01.2004 schrieb Bob Ippolito um 04:50:
> It was just the quickest path.. bgen is clunky, ctypes is 
> unstable/unpredictable, and the C API raw is too much typing (in any 
> sense of the word ;).
> 
> What I want for Pyrex is a .h -> Pyrex translator (function prototypes, 
> enums, structs).. it would save me a lot of regexing in vim.  Something 
Well, there are some ideas to go at this problem set. Actually the
problem set is much more complicated, because ideally one would need:
a) C .h -> .pyx translation.
b) C++ .h -> .C + .h + .pyx translation (basically C stubs to manipulate
C++ objects.

two ways to do this:
a) SWIG. Either add another output language, or just use the xml
backend, which seems to export basically the datastructures a SWIG
backend is presented with.
b) gcc-xml. Works only for C++. (gcc-xml didn't support C last time I
tried ;( )

In both cases it should be doable :)
> like bgen, with a different output.  I tried to write one once, but 
> it's hard and I don't really like text processing (was trying to 
> tokenize, not regex like bgen) so I've shelved it for now.

Andreas
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Dies ist ein digital signierter Nachrichtenteil
Url : http://lists.copyleft.no/pipermail/pyrex/attachments/20040130/6c88a6bd/attachment.bin


More information about the Pyrex mailing list