How to create a Python class in C?

I have an obsolete C library that creates an object tree. I would like to convert a tree to an existing Python class. How to create PyObject for this class?

+5
source share
3 answers

Cython is able to do this. This is a Pyrex semi-projector, and it can wrap existing data structures and provide them to Python. In fact, this is one of the sections in the user guide . Cython is relatively easy to use and includes an HTML output format that displays all the generated code, as well as highlighted “hot spots” where optimization can be applied.

+4

Python , pybindgen. , (, SWIG) .

+2

I have had success using Robin in these scenarios.

+1
source

All Articles