Learn · CERN

Talk14 min

Pyragen - A python wrapper generator to application core libraries

Fernando Leite Pereira · CERN

Watch At CERN

About

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..

0:00:00 Slide 1

0:01:55 Slide 2

0:02:18 Slide 3

0:02:32 Slide 4

0:02:44 Slide 5

0:03:09 Slide 6

0:03:14 Slide 7

0:04:08 Slide 8

0:04:53 Slide 9

The talk

  1. Pyragen - A python wrapper generator to application core libraries 2016-05-31 · 14 min · CERN's player

Credits and licence

Institution
CERN
Department
Developers@CERN Forum
Speaker
Fernando Leite Pereira
Year
2016
Language
English
Source
CERN
Licence
CERN, as CERN states it. CERN's terms
Attribution
© CERN. CERN provides its audiovisual media free of charge for educational and informational use, credited to CERN; this lecture is shown in CERN's own player.
Who can watch
CERN gives no rating. Invisible Network shows it to Teens profiles and older, judged from what the source says about it. How courses are placed