+1 -1 +24
Vote on this proposal

Interfacing Python with C/C++

by Sinny Kumari (speaking)

Section
Core Python
Technical level
Beginner

Objective

  • Know different approaches to interface Python with C/C++
  • Find out which approach to use in a particular situation
  • Learn the basics of writing a C/C++ Python extension

Description

Python is a very powerful language and contains all language features to support most of people’s computing needs. The core feature set is augmented by lot of modules which are available for Python. However, there will be times in a real-world project where you might need to access data or call functions which are implemented in C/C++. The most common reasons for doing this is to reuse existing C/C++ libraries which provide some specific functionality for your project, or simply to boost performance.

While different approaches that we will talk about are C/C++ Python extension, ctypes, SWIG, CFFI, boost.python etc, this talk will focus on a working example of a C/C++ Python extension. The talk will also compare the advantages and disadvantages of these approaches to help participants to decide what is best for their usecase.

Requirements

Basic knowledge of C/C++ and Python

Speaker bio

I have worked extensively on writing C python extensions as part of my work at Red Hat. The extensions provide data which are consumed by high level Python applications. While primarily a C/C++ programmer, I play with Python (and Django) during my spare time. Additionally, I am an Open Source enthusiast and contribute to the KDE project and have also given talks at various KDE events.

I blog at http://www.sinny.in

Comments

Login with Twitter or Google to leave a comment →