Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Zuzu-Typ/Python-C-API-extension-template

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Python C++ extension template

A template for a Python C-API based extension

Why would you want to have a Python C++-extension in the first place?
The answer is quite simple: Performance.
Although you can achieve improved performance using Cython, you can never beat C/C++ level performance.

About this template

Introduction

This template provides a very basic Python extension written in C/C++.
The extension module "template" contains a function "test" and a class "example_class".
The "example_class" has a single member "value" (of type double => float), and supports a lot of operations.
It also shows how to import a module ("math.pi" in this case).

Work in progress.

Releases

No releases published

Packages

No packages published
Morty Proxy This is a proxified and sanitized view of the page, visit original site.