title: How to eliminate absolute path in zip archive if absolute paths for files are provided?
body: <p>I have two files in two different directories, one is <code>'/home/test/first/first.pdf'</code>, the other is <code>'/home/text/second/second.pdf'</code>. I use following code to compress them:</p>
  <pre><code>import zipfile, StringIO
  buffer = StringIO.StringIO()
  first_path = '/home/test/first/first.pdf'
  second_path = '/home/text/second/second.pdf'
  zip = zipfile.ZipFile(buffer, 'w')
  zip.write(first_path)
  zip.write(second_path)
  zip.close()
  </code></pre>
  <p>After I open the zip file that I created, I have a <code>home</code> folder in it, then there are two sub-folders in it, <code>first</code> and <code>second</code>, then the pdf files. I don't know how to include only two pdf files instead of having full path zipped into the zip archive. I hope I make my question clear, please help.</p>