© The Author(s), under exclusive license to APress Media, LLC, part of Springer Nature 2022
A. GladstoneC++ Software Interoperability for Windows Programmershttps://doi.org/10.1007/978-1-4842-7966-3_8

8. Module Development with Boost.Python and PyBind

Adam Gladstone1  
(1)
Madrid, Spain
 

Introduction

In the previous chapter, we saw how to create a basic Python extension module. We added code to expose functionality from the underlying C++ library of statistical functions. We saw how to perform the conversion between PyObject pointers and native C++ types. While not especially difficult, we saw that it is potentially error prone. In this chapter, we consider two frameworks – Boost.Python and PyBind – that overcome these difficulties, making the development ...

Get C++ Software Interoperability for Windows Programmers: Connecting to C#, R, and Python Clients now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.