30-31 May 2016
Europe/Zurich timezone
There is a live webcast for this event.

Pyragen - A python wrapper generator to application core libraries

31 May 2016, 16:45
31/3-004 - IT Amphitheatre (CERN)

31/3-004 - IT Amphitheatre


Show room on map


Fernando Leite Pereira (CERN)


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

Primary author

Fernando Leite Pereira (CERN)


Chris Theis (CERN)

Presentation Materials