I am going to make an app where every 200ms, the input value is taken and the python webpage should update. However, render_template updates the webpage when run, and therefore hurts the viewer's eyes and deletes the text in such input box. I would rather use flask because I am more comfortable in it, but if I need to, can someone point me to resources for tornado? For example:
from flask import Flask, render_template, request, send_from_directory
import time
a = 0
b = 0
@app.route('/')
app = Flask('app', static_url_path = "/static")
def home():
return render_template('home-simple.html', a, b)
while 0 == 0:
a += 1
#somehow update home-simple.html
time.sleep(200)