Write a C++ extension module for Python

Posted by bob on Nov 25, 2022 4:00 AM EDT
Opensource.com; By Stephan Avenwedde
Mail this story
Print this story

In this article, I’ll show you how to write an extension module. Instead of plain C, I use C++ because most compilers usually understand both. I have to mention one major drawback in advance: Python modules built this way are not portable to other interpreters. They only work in conjunction with the CPython interpreter. So if you are looking for a more portable way of interacting with C libraries, consider using the ctypes module.

Full Story

  Nav
» Read more about: Story Type: News Story; Groups: GNU, Python, Red Hat

« Return to the newswire homepage

This topic does not have any threads posted yet!

You cannot post until you login.