项目作者: Zuzu-Typ

项目描述 :
A template for the Python c-api
高级语言: C++
项目地址: git://github.com/Zuzu-Typ/Python-C-API-extension-template.git
创建时间: 2018-03-11T20:36:34Z
项目社区:https://github.com/Zuzu-Typ/Python-C-API-extension-template

开源协议:The Unlicense

下载


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.