如何在python和go语言之间共享变量?

i need to know how share variable between two program, basically the go program have to write a variable ,like a string, and the python program have to read this variable. Please help me, thank you in advance.

use standard streams. use a simple printf type command to print the string to stdout. then read it with a raw_input() in python.

run the two programs like so:

./output | ./read.py

In Windows, most common way to do communication between two processes is "Named Pipe" (could also be tcp/ip, web service, etc...).

A ugly but lighter way is to write the value to a file, and read it from python.