Software applications developed in C/C++ and other compiled languages may be split into several executables and shared libraries, so that different components or applications can reuse the same code base. However, reusing shared libraries from applications written in different languages can be quite challenging, especially if we must keep the original code unchanged.
A specific case within the RP group was to access the core routines of a software directly from Python, enabling for interactive manipulation of the data and building programs on top of that, without re-implementing or even modifying the existing functions.
For that purpose an IPC specification was investigated and a software tool developed in Python which creates Python bindings by directly by inspecting the .h header file. By specifying accessor functions, accordingly named, in the library side, the generated wrapper offers an object-oriented interface to the DLL, handling type conversion and storing objects as necessary.
The current solution differs from existing binding generators as it doesn’t requires changes in the source routines (only the creation of accessor functions) and the generated wrapper is very clean Object-Oriented Python code, very easily customizable.
|Talk Length||15 minutes|