I am trying following code:
package main
import ("fmt"; "log"; "os/exec")
func main() {
cmd := exec.Command("/usr/bin/python3.5", "-c",
"import easygui as eg; print('Hello world'); eg.msgbox(msg='Hi there'); print('from Golang')")
out, err := cmd.CombinedOutput()
if err != nil { log.Fatal(err) }
fmt.Printf(string(out)) }
I am trying it to print on terminal first, then show a gui messagebox, then again print on terminal.
However, it first shows a message box, then does both print statements.
How can this be solved?