https://pypi.python.org/pypi/python-librsync/0.1-5
import librsync
# The destination file.
dst = file('Resume-v1.0.pdf', 'rb')
# Step 1: prepare signature of the destination file
signature = librsync.signature(dst)
I want to store the signature in a file (preferably as a dictionary entry using pickle
). I would want to calculate the delta
file afterwards.
How do I save this signature object for future use?
Update:
I tried to pickle the object but it says TypeError: can't pickle StringO objects
.
Update 2: The signature object that was returned had reference to a file object. Python can't pickle a file object. I solved it using dill
which is an extended version of the pickle
module.
Added it as an answer.