title: How do I update variable from Flask Form to a continuously running python script, without the script stopping and waiting for the user form input?
body: <p>This code does not work, but It's a basic start. I need some direction on how to have a script running, and when user wants to change variables through a web from, to have the new variables passed into the script, without the script stopping and waiting for the information? </p>
  
  <pre><code>from flask import Flask
  from flask import request
  from flask import render_template
  import time
  
  app = Flask(__name__)
  
  
  @app.route('/')
  def my_form():
      return render_template("form1.html")
  
  @app.route('/', methods=['POST'])
  def my_form_post():
      text = request.form['text']
      myFunction(text)    
      return text
  
  def myFuction(var):#loop does not stop and wait for form submission...
      while True:
          print var
          time.sleep(0.25)
  
  if __name__ == '__main__':
      app.run()
  </code></pre>