Click here to Skip to main content
15,896,915 members
Articles / Programming Languages / Python

Interfacing C++ and Python with the Python API

Rate me:
Please Sign up or sign in to vote.
5.00/5 (11 votes)
2 Aug 2023CPOL15 min read 11.3K   267   28  
This article explains how the Python API makes it possible to embed Python in C++ and write extension modules in C++ that can be imported in Python.
The Python API is a C/C++ programming toolset that enables developers to write code that integrates Python and C++. The first part of the article shows how the Python API makes it possible to access Python code in a C/C++ application. The second part explains how to code extension modules in C++ that can be imported into regular Python code.

Views

Daily Counts

Downloads

Weekly Counts

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
United States United States
I've been a programmer, engineer, and author for over 20 years.

Comments and Discussions