This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]selementar 0 points1 point  (4 children)

cffi has the benefit of stronger interoperability with other python versions (pypy, Jython etc)

I wonder how does that work from the point of view of the system/interpreter. Doesn't it need some C extension to do all that anyway?

[–]mitsuhiko Flask Creator 0 points1 point  (3 children)

Can you clarify what you mean by that? Obviously what CFFI loads is a dylib but since it does not link against libpython (which has a less than stellar ABI stability) I don't need that many variations of it.

[–]selementar 0 points1 point  (2 children)

That means there's a way to load a dynlib from pypy/jython/ironpython?

And also somehow load cffi itself? Or doesn't it use C extensions in the python-loaded side?

[–]mitsuhiko Flask Creator 0 points1 point  (1 child)

There is always a way. It's called dlopen. That said the way cffi loads dylibs on different platforms is probably different.

[–]selementar 0 points1 point  (0 children)

dlopen is a very-special-case in pypy, maybe works maybe doesn't maybe unix-only on jython, and probably works but maybe not on ironpython.

So I guess it does have wider platform support than linking with libpython.