In the "old days", when there was only cpython, most extensions were written in c (as platform independent as possible) and compiled into pyd (for example, PyCrypto). Now there are Jython, IronPython and PyPy, and pyds do not work with any of them (Ironclad aside). It seems that they all support ctypes and that the best approach MAY be to create a platform independent dll or shared library, and then use ctypes to interact with it.
But I think this approach will be a little slower than the old pyd mode approach. You can also program pyd for cpython, similar to C # dll for IronPython and java class or jar for Jython (I'm not sure about PyPy. But, although this approach will appeal to platform purists, it is very laborious. Best way to take today?
source share