title: zipping files generated on the fly
body: <p>how can you zip a bunch of files generated on the "fly"?</p>
  
  <p>im testing with this small scale scenerio:</p>
  
  <pre><code>from time import strftime
  import zipfile
  
  # create new file
  today = strftime("%Y-%m-%d %H:%M:%S")
  
  new_file = open('testing123.txt', 'w')
  text = 'this file was just added:' + str(today)
  new_file.write(text)
  
  # create zip file and write to it
  newZip = zipfile.ZipFile("test.zip", "w")
  newZip.write('testing123.txt')
  new_file.close()
  
  print "file created"
  </code></pre>
  
  <p>two things, first the <code>testing123.txt</code> which is created at the top of the script is blank when you unzip the zip file created, and this should include a list of files that are generated in a loop.</p>
  
  <p>so im wondering what the best approach to generate a bunch of files on the fly and then zip them all nicely to a zip folder.</p>