title: Execute a Python script in Flask
body: <p>I have written a Python script and wish to deploy it as a "tool" using Flask. The workflow is:</p>
  
  <ol>
  <li>The user inputs information to be used at runtime by the script.</li>
  <li>The user hits an execute button.</li>
  <li>The output of the script is made available to the user via an output string displayed on-site that they can copy-paste.</li>
  </ol>
  
  <p>It's a relatively complex problem and I need help coming to an understanding of how this can be done using Flask. What steps are involved? What documentation is available? Are there code samples I can look at to see how this is done?</p>