https://github.com/manicmaniac/inline
embed inline C / C++ source codes into Python
https://github.com/manicmaniac/inline
Last synced: about 1 month ago
JSON representation
embed inline C / C++ source codes into Python
- Host: GitHub
- URL: https://github.com/manicmaniac/inline
- Owner: manicmaniac
- License: mit
- Created: 2015-11-19T14:00:34.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2020-01-25T16:58:03.000Z (over 5 years ago)
- Last Synced: 2025-03-25T06:24:02.601Z (about 2 months ago)
- Language: Python
- Size: 3.91 KB
- Stars: 5
- Watchers: 2
- Forks: 2
- Open Issues: 2
-
Metadata Files:
- Readme: README.rst
- License: LICENSE
Awesome Lists containing this project
README
inline
======.. image:: https://img.shields.io/travis/manicmaniac/inline/master.svg
:target: https://travis-ci.org/manicmaniac/inline
:alt: Travis CI.. image:: https://img.shields.io/pypi/v/inline.svg
:target: https://pypi.python.org/pypi/inline
:alt: PyPI Version.. image:: https://img.shields.io/pypi/pyversions/inline.svg
:target: https://pypi.python.org/pypi/inline
:alt: Python VersionsEmbed inline C / C++ source codes in Python.
Usage
-----.. code:: python
import inline
c = inline.c(r'''
int add(int a, int b) {
return a + b;
}
''')
c.add(40, 2).. code:: python
import inline
cxx = inline.cxx(r'''
extern "C" {
int add(int a, int b) {
return a + b;
}
}
''')
cxx.add(40, 2)Install
-------.. code:: sh
pip install inline
.. code:: sh
git clone https://github.com/manicmaniac/inline.git
cd inline
python setup.py install