title: Uploading and Downloading Files with Flask
body: <p>I'm trying to write a really simply webapp with PythonAnywhere and Flask that has lets the user upload a text file, generates a csv file, then lets the user download the csv file.  It doesn't have to be fancy, it only has to work.  I have already written the program for generating the csv from a txt file on the drive. </p>
  
  <p>Right now, my function opens the file on the drive with:</p>
  
  <pre><code>with open(INPUTFILE, "r") as fname:
  </code></pre>
  
  <p>and writes the csv with:</p>
  
  <pre><code>with open(OUTPUTFILE, 'w') as fname:
  </code></pre>
  
  <p>with INPUTFILE and OUTPUTFILE being filename strings. </p>
  
  <p>Would it be better for me to handle the files as objects, returned by the flask/html somehow?</p>
  
  <p>I don't know how to do this. How should I structure this program? How many HTML Templates do I need? I would prefer to work on the files wihthout saving them anywhere but if I have to save them to the PythonAnywhere directory, I could. How can I do that? </p>