adityaramesh / python_dummy_extension

An example Python extension module written in C++.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Overview

This is an example Python 3 extension module written in C++14. The source file for the extension module defines the following functions:

  • make_message: Returns a string containing a message.
  • reverse: Reverses a given string (assuming that each visible character is one code point). Also demonstrates how to pass exceptions to Python.

Installation

First, define the following environment variables:

  • CXX: Path to a version of g++ or clang++ that is C++14-compliant.
  • PYTHON_INCLUDE_PATH: Path to the include directory of the active Python installation.

Then run the following commands:

rake
pip install .

About

An example Python extension module written in C++.


Languages

Language:C++ 67.0%Language:Ruby 18.0%Language:Python 14.9%