Question:
How can I call a Go routine from Python and avoid the extra layer of C?
Answer:
Currently, this is not possible without external libraries. However, as of Go 1.5, it is possible to build .so objects and import them as Python modules, allowing Go code to be run directly from Python.
Solution using Go 1.5:
Alternative Solution Using gopy:
The above is the detailed content of How Can I Call a Go Routine from Python Without Using C?. For more information, please follow other related articles on the PHP Chinese website!