From 19add390ff580223c2f9d7fdbf3982ba33874597 Mon Sep 17 00:00:00 2001 From: Sebastien Binet Date: Fri, 7 Aug 2015 13:17:55 +0200 Subject: [PATCH] doc: add blurb about gopy module Change-Id: Ib0f60c2823eb2e517190954e1b13535d86c69fb6 --- README.md | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/README.md b/README.md index 76287b7..814c906 100644 --- a/README.md +++ b/README.md @@ -59,6 +59,26 @@ Options: ## Examples +### From the `python` shell + +`gopy` comes with a little `python` module allowing to wrap and compile `go` +packages directly from the `python` interactive shell: + +```python +>>> import gopy +>>> hi = gopy.load("github.com/go-python/gopy/_examples/hi") +gopy> inferring package name... +gopy> loading 'github.com/go-python/gopy/_examples/hi'... +gopy> importing 'github.com/go-python/gopy/_examples/hi' + +>>> print hi + + +>>> print hi.__doc__ +package hi exposes a few Go functions to be wrapped and used from Python. +``` + +### From the command line ```sh $ gopy bind -output=out github.com/go-python/gopy/_examples/hi $ ls out