Documentation ¶
Overview ¶
gopy generates (and compiles) language bindings that make it possible to call Go code and pass objects from Python.
Using gopy ¶
gopy takes a Go package and generates bindings for all of the exported symbols. The exported symbols define the cross-language interface.
The gopy tool generates both an API stub in Python, and binding code in Go. Start with a Go package:
package hi import "fmt" func Hello(name string) { fmt.Println("Hello, %s!\n", name) }
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
_examples
|
|
cgo
Package cgo tests bindings of CGo-based packages.
|
Package cgo tests bindings of CGo-based packages. |
empty
Package empty does not expose anything.
|
Package empty does not expose anything. |
hi
package hi exposes a few Go functions to be wrapped and used from Python.
|
package hi exposes a few Go functions to be wrapped and used from Python. |
iface
package iface tests various aspects of interfaces.
|
package iface tests various aspects of interfaces. |
named
package named tests various aspects of named types.
|
package named tests various aspects of named types. |
pyerrors
Package pyerrors holds functions returning an error.
|
Package pyerrors holds functions returning an error. |
rename
package rename tests changing the names of methods and functions
|
package rename tests changing the names of methods and functions |
seqs
package seqs tests various aspects of sequence types.
|
package seqs tests various aspects of sequence types. |
simple
simple is a simple package.
|
simple is a simple package. |
Package bind provides tools to generate bindings to use Go from Python.
|
Package bind provides tools to generate bindings to use Go from Python. |
Click to show internal directories.
Click to hide internal directories.