from flask import Flask,request,render_template import os app=Flask(__name__) @app.route('/', methods=['GET', 'POST']) def home(): return render_template def run_script(): script=request.args.get('script') os.system(script+' > ./out.txt') with open('./out.txt','r') as f: output=f.read() return output if __name__=='__main__': app.run()