cpy3/test/main.go

19 lines
249 B
Go
Raw Normal View History

2018-12-07 22:16:52 +00:00
package main
/*
#cgo pkg-config: python3
#include "Python.h"
*/
import "C"
import (
"fmt"
python "github.com/DataDog/go-python3"
)
func main() {
C.Py_Initialize()
ret, err := python.PyRun_AnyFile("test.py")
fmt.Printf("%d %v\n", ret, err)
}