Commit 936c466d authored by SimonGlomb's avatar SimonGlomb
Browse files

generalize argument parsing

parent b8861048
from flask import Flask, render_template, request
import os
from sympy import arg
import model
app = Flask(__name__)
......@@ -14,10 +16,8 @@ def hello_world():
@app.route("/run_code", methods=["GET"])
def run_code():
global params
varX = "python ./code/main.py " + str(params[0])
print(varX)
os.system("python ./code/main.py " + str(params[0]))
arguments = " ".join(params)
os.system("python ./code/main.py " + str(arguments))
return "<p>Back to Main Page</p>"
@app.route("/set_params", methods=["POST"])
......@@ -33,7 +33,6 @@ def set_params():
form.cluster_count.data,
form.ocel_file_type.data,
form.graph_file_type.data]
print(params)
if form.validate_on_submit():
return "<p>Parameters where set successfully.</p>"
return render_template('start_page.html', form=form)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment