title: How to zip a folder and file in python?
body: <p>I've got a folder called: 'files' which contains lots of jpg photographs. I've also got a file called 'temp.kml'. I want to create a KMZ file (basically a zip file) which contains the temp.kml file AND the files directory which has the photographs sitting inside it.</p>
  
  <p>Here is my code:</p>
  
  <pre><code>zfName = 'simonsZip.kmz'
  foo = zipfile.ZipFile(zfName, 'w')
  foo.write("temp.kml")
  foo.close()
  os.remove("temp.kml")
  </code></pre>
  
  <p>This creates the kmz file and puts the temp.kml inside. But I also want to put the folder called 'files' in as well. How do I do this?</p>
  
  <p>I read here on StackOverflow that some people have used shutil to make zip files. Can anyone offer a solution?</p>