I'm running a flask server, with a textbox input and a while loop (in a different thread). I want to pass the input value from the textbox to the while loop.

This is the .py code:

Code:
from flask import Flask, render_template, request
import thread
import time

app = Flask(__name__)
def main():
    
    while True:
        time.sleep(5)
        print "var
...