Skip to content

Example showing how to write a Python extension module in OCaml using ocaml-ctypes.

License

Notifications You must be signed in to change notification settings

zxygentoo/ocaml-ctypes-python-extension-example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Example showing how to write a Python extension module using ocaml-ctypes, based on ocaml-ctypes-inverted-stubs-example.

Install OCaml dependencies

opam install ctypes-foreign ctypes

and a working python3 installation, eg. on ubuntu, it will be something like:

apt-get install python-dev

Build the example extension (pymod.so)

make

Run Python tests on example extension

python3 tests.py
  • tested on python-3.6.5 but should work on recent python3 releases.

About

Example showing how to write a Python extension module in OCaml using ocaml-ctypes.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published