open a python script on click flask

Solutions on MaxInterview for open a python script on click flask by the best coders in the world

showing results for - "open a python script on click flask"
Angela
31 Sep 2019
1@app.route('/run-script')
2def run_script():
3   result = subprocess.check_output("python main.py", shell=True)
4   return render_template('results.html', **locals())