Re: Zipped and pickle

2009-09-16 Thread Thomas Lehmann
> Briefly: > > s = cPickle.dumps(obj) > z = zipfile.Zipfile("filename.zip","w",zipfile.ZIP_DEFLATED) > z.writestr("arcname.pkl",s) Thank you very much. I have not been aware that pickle can also do the job without a file! Here's the complete scenario for writing and reading the data... APPENDIX:

Re: Zipped and pickle

2009-09-16 Thread Carl Banks
On Sep 16, 4:40 am, Thomas Lehmann wrote: > How do I implement best to use pickle that way that the file is zipped? Briefly: s = cPickle.dumps(obj) z = zipfile.Zipfile("filename.zip","w",zipfile.ZIP_DEFLATED) z.writestr("arcname.pkl",s) Carl Banks -- http://mail.python.org/mailman/listinfo/py

Zipped and pickle

2009-09-16 Thread Thomas Lehmann
How do I implement best to use pickle that way that the file is zipped? -- http://mail.python.org/mailman/listinfo/python-list