On Aug 15, 2007, at 9:44 AM, David Binger wrote:
On Aug 15, 2007, at 9:34 AM, Christian Theune wrote:
pfile = StringIO(data)
unpickler = Unpickler(pfile)
unpickler.persistent_load = persistent_load
newp = StringIO()
pickler = Pickler(newp, 1)
pickler.persistent_id = persistent_id
data = newp.getvalue()
Why do we call pickler.dump(unpickler.load()) twice?
Just a guess, but I think it is because the original data record is
the concatenation of two pickles, the first for the class (or
like that) and the second is the actual pickled object state.
It looks like this code extracts the pickled state from the record.
Yup. Exactly right,
Jim Fulton mailto:[EMAIL PROTECTED] Python
CTO (540) 361-1714
Zope Corporation http://www.zope.com http://www.zope.org
For more information about ZODB, see the ZODB Wiki:
ZODB-Dev mailing list - ZODB-Dev@zope.org