gopy/_examples/gopy-test/main.go

24 lines
399 B
Go
Raw Normal View History

2015-01-30 17:02:15 +00:00
// a go wrapper around py-main
package main
import (
"os"
"github.com/go-python/gopy-gen/_examples/py_hi"
2015-01-30 17:23:06 +00:00
python "github.com/sbinet/go-python" // FIXME(sbinet): migrate to go-python/py
2015-01-30 17:02:15 +00:00
)
func init() {
err := python.Initialize()
if err != nil {
panic(err.Error())
}
2015-01-30 17:23:06 +00:00
py_hi.Register() // make the python "hi" module available
2015-01-30 17:02:15 +00:00
}
func main() {
rc := python.Py_Main(os.Args)
os.Exit(rc)
}