comparable shelve function in xml

A.M. Kuchling amk at mira.erols.com
Fri Dec 15 13:52:58 EST 2000


On Fri, 15 Dec 2000 16:15:31 GMT, Stan Lee <slee4812 at my-deja.com> wrote:
>Is there a comparable way to store Python objects in an XML formatted
>file like the shelve module does?  I want to be able to store Python
>objects to a file that's human-readable on both a Windows and Linux
>platform.  Thanks.

There are a few.  Hiding inside Zope there's a ppml.py file which has
much the same functionality as the pickle module.  Hiding inside the
PyXML codebase, there's an xml.marshal package which has support for
WDDX, XML-RPC, and a generic Python marshalling format.  It depends if
you only need simple data types -- integers, strings, that sort of
thing -- or need the full generality of handling objects, recursive
lists, &c.

--amk



More information about the Python-list mailing list