Interfacing with C/C++ Libraries from Python and creating a Python Module using C++

Anupam Basak (~anupam5)


0

Votes

Description:

Python is great for super fast script and fast paced development. For any realtime or more involved tasks, C/C++ is always preferred. Python allows you to interface with C++ libraries using various methods like ctypes, cffi and modules.

This workshop will focus on 2 very important topics : 1. How to interface with C++ libraries from python using ctypes 2. How to create a Python Module in C++

The first method will allow you to call C/C++ functions from a library and record the return value from Python using the ctypes module. This method is simple to setup and easy to use. But for complex and more involved tasks the seconds method is preferred

The second method will allow you to create a Python module that could be imported and used like any other modules in Python. You will be able to export a C/C++ library as a Python Module with the use of Shiboken library.

Prerequisites:

  • Basic C++
  • Basic Python
  • CMake

Content URLs:

Github : https://github.com/anupam-git/

Speaker Info:

Hello, I am Anupam Basak, a Freelance Software Engineer from Kolkata, India. I am an avid open source enthusiast, love OSS and recently started contributing to KDE.

Speaker Links:

  • Pico Wizard (A post installation wizard for plasma mobile) : https://invent.kde.org/plasma/pico-wizard/
  • Frameworks For Python (Python bindings for KDE Frameworks libraries)[WIP] : https://invent.kde.org/anupambasak/frameworks-for-python

Section: Core Python
Type: Workshops
Target Audience: Intermediate
Last Updated: