Skip to content

Demos of calling c extension in python using ctypes/pybind11/cpython

Notifications You must be signed in to change notification settings

ailzhang/c_ext_for_py

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Compile ctypes demo

I didn't bother writing a proper build_ext for this so manual copy is required.

mkdir build
cd build
cmake .. && make
cp *.so ../

Compile pybind11 & cpython & swig demo

Make sure you have swig installed. (brew install swig on mac)

python setup.py build && pip install -e .

Run

python main.py

python demo_pybind11.py

References

About

Demos of calling c extension in python using ctypes/pybind11/cpython

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published