Skip to main content

embed inline C / C++ source codes in Python

Project description

Travis CI PyPI Version Python Versions

Embed inline C / C++ source codes in Python.

Usage

import inline
c = inline.c(r'''
int add(int a, int b) {
    return a + b;
}
''')
c.add(40, 2)
import inline
cxx = inline.cxx(r'''
extern "C" {
    int add(int a, int b) {
        return a + b;
    }
}
''')
cxx.add(40, 2)

Install

pip install inline
git clone https://github.com/manicmaniac/inline.git
cd inline
python setup.py install

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

inline-0.0.1.tar.gz (2.7 kB view hashes)

Uploaded Source

Built Distribution

inline-0.0.1.linux-x86_64.tar.gz (2.9 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page