You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello! Is there a one-click way to convert a Go module like mylib.module.go into a Python file so our Python teammates can continue development more easily?
If you want to integrate it into gpython then you need to add a bit of boilerplate to turn it into a gpython module.
If you want to integrate it with cpython then you'll need to make a shared library with CGO. I did this for another project - you might want to this check out to see how it is done: http://github.com/rclone/rclone/tree/master/librclone which has python bindings for Go via CGO.
Activity
ncw commentedon Jul 25, 2025
If you want to integrate it into gpython then you need to add a bit of boilerplate to turn it into a gpython module.
If you want to integrate it with cpython then you'll need to make a shared library with CGO. I did this for another project - you might want to this check out to see how it is done: http://github.com/rclone/rclone/tree/master/librclone which has python bindings for Go via CGO.
sbinet commentedon Jul 25, 2025
another option (for the CPython use case), is to use go-python/gopy.