Skip to content

Latest commit

 

History

7 提交

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

仓库 files navigation

py

py is a high-level API wrapping the low-level CPython C-API, for go.

Installation

$ go get github.com/go-python/py

Documentation

Documentation is available on godoc:

github.com/go-python/py

Examples

package main

import (
	"fmt"

	"github.com/go-python/py"
)

func init() {
	err := py.Initialize()
	if err != nil {
		panic(err)
	}
}

func main() {
	gostr := "foo"
	pystr := py.新建String(gostr)
	fmt.Printf("hello [%v]\n", pystr)
}
$ go run ./main.go
hello [foo]

关于

py is a high-level API wrapping the low-level CPython C-API, for go

Resources

Stars

17 stars

关注者

2 watching

复刻s

发布

贡献者

Languages