Zipfile library extraction issue
<p>I'm using <a href="http://docs.python.org/library/zipfile.html" rel="nofollow">http://docs.python.org/library/zipfile.html</a> to compress file into a zip. It works well but when extracting that file via my ubuntu (not in python, just right clicking file and then 'Extract here') file is truncated. My original file has ~167kb, extracted via ubuntu ~164kb (it's csv file, so I miss few lines from the end of file).</p>

<p>Any suggestions?</p>

<p>Edit:</p>

<p>My code looks as follows:</p>

<pre><code>try:
    fp2 = zipfile.ZipFile(el.replace('.csv', '.zip'), 'w',
            zipfile.ZIP_DEFLATED)
    fp2.testzip()
    fp2.write(el)
finally:
    fp2.close()
</code></pre>

<p>Where el is some csv file.</p>

<p>Edit2:
It appears that while writing to a zipfile some data is lost. </p>
