[Python-3000] Ctypes as cross-interpreter C calling interface

Paul Prescod paul at prescod.net
Thu Aug 10 07:19:03 CEST 2006


Thanks for everyone who contributed. It seems that the emerging consensus
(bar a security question from Guido) is that ctypes it the way forward for
calling C code in Python 3000. I'd like to clarify what this might mean:

1. Is ctypes and pure python fast enough for most real-world extension
modules like PyOpenGL, PyExpat, Tkinter, and socket programming? I know that
experimentation is ongoing. Are any results in?

 2. If not, will Python 3000's build or runtime system use some kind of
optimization technique such as static compilation (e.g. extcompiler[1]) or
JIT compilation to allow parts of its library (especially new parts) to be
written using ctypes instead of C?

 3. Presuming that the performance issue can be worked out one way or
another, are there arguments in favour of interpreter-specific C-coded
extensions other than those doing explicitly interpreter-specific stuff (e.g.
tweaking the GC).

 4. Will the Python 3000 standard library start to migrate towards ctypes
(for new extensions)?

 Paul Prescod

[1] http://codespeak.net/pypy/dist/pypy/doc/extcompiler.html
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/python-3000/attachments/20060809/3b2d1dd1/attachment.html 


More information about the Python-3000 mailing list