gopy/doc.go

26 lines
659 B
Go
Raw Permalink Normal View History

2015-01-30 17:01:15 +00:00
// Copyright 2015 The go-python Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
/*
2015-07-24 14:16:31 +00:00
gopy generates (and compiles) language bindings that make it possible to call Go code
and pass objects from Python.
2015-01-30 17:01:15 +00:00
# Using gopy
2015-01-30 17:01:15 +00:00
2015-07-24 14:16:31 +00:00
gopy takes a Go package and generates bindings for all of the exported
2015-01-30 17:01:15 +00:00
symbols. The exported symbols define the cross-language interface.
2015-07-24 14:16:31 +00:00
The gopy tool generates both an API stub in Python, and binding code in
2015-01-30 17:01:15 +00:00
Go. Start with a Go package:
package hi
2015-01-30 17:01:15 +00:00
import "fmt"
2015-01-30 17:01:15 +00:00
func Hello(name string) {
fmt.Println("Hello, %s!\n", name)
}
2015-01-30 17:01:15 +00:00
*/
package main