I have a Python script called test.py
with lots of functions and loops which outputs some raw data and I'm trying to run it from a webpage.
As an initial step I prepared a very simple code below using flask to see whether my script works or not.
I expected to render the output (some raw data) on the webpage but it seems it doesn't work for me, maybe I don't have a good start for this.
In short, the thing I need is to enter to my server address and see the output of my script.
Yes if every thing is going well I will develop it to get input data too.
from flask import Flask, redirect, url_for, request
import test
app = Flask(__name__)
@app.route('/')
def dynamic_page():
return test()
if __name__ == '__main__':
app.run(debug=True)