In my Go file i use exec to run the external script:
cmd := exec.Command("test.py")
out, err := cmd.CombinedOutput()
if err != nil {
fmt.Println(err)
}
fmt.Println(string(out))
The python script it's executed fine, but the go fmt.Println(string(out))
prints nothing.
The question it's how i should return the value from the Python script to be read back again from Go?
Python pseudo code:
def main():
...
...
return value