Open GoogleCodeExporter opened 8 years ago
This is because you aren't closing the file you opened. Files are added to the
zip when they are closed, in your code the file is closed *after* the zipfs is
closed (when the file goes out of scope.
Try the following:
import fs.zipfs
z = fs.zipfs.ZipFS('out.zip', 'w')
with z.open('foo.txt', 'wb' as f:
f.write('nmj')
z.close()
or you could use:
z.setcontents('goo.txt', 'nmj')
Original comment by willmcgugan
on 31 Jul 2014 at 8:05
Original issue reported on code.google.com by
zopyxfilter
on 31 Jul 2014 at 6:17