I’m trying to execute a python file using GoLang however I’m running windows and it doesn’t like the backslashes. I’ve searched the web but there are no clear and general answers. I get the error %1 is not a valid win32 application.
I would appreciate any help. Thanks.
package main
import (
"os/exec"
"fmt"
)
func main() {
cmd := exec.Command("C:\\Users\\me\\go\\test.py")
output, err := cmd.Output()
if (err != nil) {
fmt.Println(err)
}
fmt.Println(string(output))
}