command
module
Version:
v0.0.0-...-54552bd
Opens a new window with list of versions in this module.
Published: Jan 28, 2020
License: Apache-2.0
Opens a new window with license information.
Imports: 6
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
README
¶
Using Go from Python
This repository is a toy example of using Cgo and Python's C FFI to effectively reuse Go code
from Python. Tested on Go 1.12+, Python 3.8+.
Notes:
- In the
lib
dir, one does not need the generated C header file. It can be useful, however,
for understanding how Cgo generates code.
- Required Python packages: To run tests,
pytest
is required. To try the example
notebook, jupyter
is required.
Usage
Build shared C lib, run Go and Python unit tests:
$ make
Cleanup:
$ make clean
Explore with Jupyter Notebook:
$ jupyter notebook # then open example.ipynb
© 2020 Damien Stanton
See LICENSE for details.
Documentation
¶
There is no documentation for this package.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.