qshh...@alumni.sjtu.edu.cn writes: ... Python/C++ integration ... When I learn about a task to integrate Python with C or C++, I first think of "cython". "cython" facilitates those integrations. Especially, it has annotations to control the GIL.
I have used "cython" for the implementation of a Python binding to the XML security library. The result ist "dm.xmlsec.binding". There, I use both ("cython") annotations to release the GIL when passing over control from Python to C; as well as ("cython") features to implement a callback from C to Python. -- https://mail.python.org/mailman/listinfo/python-list