Re: [pygccxml-development] ctypes code generation?
Brought to you by:
mbaas,
roman_yakovenko
From: Gordon K. <gk...@bw...> - 2008-10-15 16:46:03
|
hello, On Oct 13, 2008, at 4:39 PM, Roman Yakovenko wrote: > I am developing Py++, a code generator for Boost.Python library, and > recently integrated some functionality, which allows to export some > "C" code easily. ... I noticed that your announcement of the next version also seemed to mention something about this. Would it be possible to point me to an existing example of doing this? Or any hints about how to do it myself? > There are few other solutions that help to export and > create Pythonic interface for "C" classes and functions. For example > take a look on functions transformation future ( > http://language-binding.net/pyplusplus/documentation/functions/ > transformation/transformation.html > ). Do you want to reconsider your approach :-) ? I'm relatively new to python, so I have to admit I don't grasp the significance of what this page describes. Again, some simple examples of wrapping C code would really help me understand how I could use your tools. > May be the best solution for you is to add missing functionality to > ctypeslib? It is not too difficult after all. I can help you with > gccxml. > > I did not know that ctypes code generator is not maintained. I think, > I am going to evaluate and may be to support it. If you want we can > join the efforts. Well, in the mean time I have in fact found a way to tweak the xml2py script of ctypeslib, and I've announced the patch on the ctypes-users mailing list, which I can forward to you if interested. So ctypeslib is working again for me, with gcc 4.0.1 and gccxml 0.9.0, but there are probably still some small problems. I do think it would be very good if ctypeslib is still maintained by someone. To me it seems like a tool that is very good at its one thing, and its a shame when those tools stop working. Alternatively, from what I understand, it seems like the pygccxml output could also be parsed to generate the same ctypes code that ctypeslib generates- that is, the brains of ctypeslib's xml2py script could operate on the pygccxml parse tree instead of the XML file directly. But I barely know what I'm talking about! thanks, Gordon |