On a related but different note, what is the recommended policy(assuming it's not to use the C API) for embedding Python, and forexposing the embedding app to Python as a C extension? My standardexample of this is the Vim interface to Python - seehttps://github.com/vim/vim/blob/master/src/if_python3.c. I originallywrote this back in the Python 1.5 days, so it's *very* old, and quitelikely not how I'd write it now, even using the C API. But what's therecommendation for code like that in the face of these changes, andthe suggestion that using 3rd party tools is the normal way to write Cextensions?
I’d like to +1 this request for a standard for embedding Python while
at the same time exposing the embedding app to Python as a C extension. We do
something remarkably similar to Vim here (along with other files in the same directory).
I’ve looked into cffi but it seems to only solve a fraction of the problem. Our
Qt-based application embeds Python and provides callbacks from Python to our
application. It runs on macOS, Linux, and Windows and runs unchanged on
Python 3.6, 3.7, and 3.8 since it dynamically links to Python.