From: Eric F. <ef...@ha...> - 2012-12-04 03:41:52
|
On 2012/12/03 4:54 AM, Michael Droettboom wrote: > I think Cython is well suited to writing new algorithmic code to speed > up hot spots in Python code. I don't think it's as well suited as glue > between C and Python -- that was not a main goal of the original Pyrex > project, IIRC. It feels kind of tacked on and not a very good fit to > the problem. Not entirely relevant to the PyCXX discussion, but to avoid misleading others reading this discussion, I must strongly disagree with your assertion about Cython's usefulness for wrapping C libraries or small chunks of C. I think this has always been a primary function of Cython and Pyrex, as far back as I have been aware of them. I wrote the raw interface to our contouring code, and I have written cython interfaces to various chunks of C outside of mpl; and cython makes it much easier for a non-professional programmer such as myself. So I am not arguing that Cython should be the choice for removing PyCXX, but for non-wizards, it can work very well as glue. It is much more approachable than any alternative of which I am aware. For Fortran, of course, f2py plays this glue code generation role. Eric |