http.HandleFunc("/", func(rw http.ResponseWriter, req *http.Request) {
params := req.URL.Query();
fmt.Println(params.Get(“Appp”));
f, _ := os.Create("./samples1.py")
// check(err)
defer f.Close()
w := bufio.NewWriter(f)
_, _ = fmt.Fprintf(w, "%s\n", params.Get("Appp"))
// check(err)
w.Flush()
cmd := exec.Command("python", "samples1.py")
We are getting python code from html file using ajax call and then writing that data into some .py file in backend
Then we are executing that .py file using Go lang with cmd := exec.Command(“python”, “samples1.py”)
I need to run the python code without creating new files**(here samples1.py)** at backend using Go lang
is there any way to do this …plzz help me with this
@NobbZ
@lutzhorn
@calmh