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
Slides
https://docs.google.com/presentation/d/1UKitmpqeaPvxLaPlTJVzLtI-PZmG4pgxkibbqVgKelY/
Links
- Extending Python with C/C++ - https://docs.python.org/2/extending/extending.html
- Talk given at conf.kde.india - http://kde.in/content/one-app-rule-all-your-media
1
▼
Sinny, can you provide links to your any previous talks (slides and/or videos).
May be you can cover CFFI as well in your talk: https://cffi.readthedocs.org
1
▼
Thank you for feedback. Added previous talk link and will talk about CFFI too.
1
▼
Can you please give us an outline for the talk? Or else this is too big for a 30 minutes talk.
1
▼
Added outline of talk, detailed content will be added later. Let me know in case I missed something :)
1
▼
I think you should add more details about your talk in those slides.