[Zope3-checkins] CVS: Zope3/src/zope/xmlpickle - xmlpickle.py:1.4.10.1

Jim Fulton jim at zope.com
Fri Jan 16 10:43:35 EST 2004


Update of /cvs-repository/Zope3/src/zope/xmlpickle
In directory cvs.zope.org:/tmp/cvs-serv19222/src/zope/xmlpickle

Modified Files:
      Tag: zope3-zodb3-devel-branch
	xmlpickle.py 
Log Message:
Added the abaility to extract pickles from multi-pickle pickle
strings.


=== Zope3/src/zope/xmlpickle/xmlpickle.py 1.4 => 1.4.10.1 ===
--- Zope3/src/zope/xmlpickle/xmlpickle.py:1.4	Sun Sep 21 13:32:12 2003
+++ Zope3/src/zope/xmlpickle/xmlpickle.py	Fri Jan 16 10:43:34 2004
@@ -73,10 +73,13 @@
     _PicklerThatSortsDictItems(file, bin).dump(object)
     return file.getvalue()
 
-def toxml(p):
+def toxml(p, index=0):
     """Convert a standard Python pickle to xml
     """
     u = ppml.ToXMLUnpickler(StringIO(p))
+    while index > 0:
+        xmlob = u.load()
+        index -= 1
     xmlob = u.load()
     r = ['<?xml version="1.0" encoding="utf-8" ?>\n']
     xmlob.output(r.append)




More information about the Zope3-Checkins mailing list