Skip to content

asierrayk/swig-example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This repository is an example of how to use c code in python using swig.

Create the wrapper

$ swig -python example.i

Build the extension

python setup.py build_ext

Example usage

$ mkdir python && cd python
$ virtualenv -p python3 venv
$ source venv/bin/activate
$ pip install ..
$ python

>> from example import fact
>> fact(5)
120

About

Swig example repository to use c code in python

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published