Readable Persistance?

Simon Dahlbacka sdahlbacSPAMSUCKS at
Mon Jun 21 19:27:34 CEST 2004

Diez B. Roggisch wrote:
> Chris S. wrote:
>>I'm trying to write programs that make use of a lot of dynamic
>>structures. To aid in debugging and data extraction, I'd like to persist
>>these objects in a form that's readable, but one that also preserves
>>handles (ie for lambda expressions, dictionaries, lists, etc). Using the
>>pickle module, I can more-or-less accomplish the latter, but not the
>>former. YAML can accomplish the former to some degree, but still can't
>>represent handles. I understand the inherent difficulties in
>>representing complex objects in a human readable format, but is there
>>any way to do this with Python? Any help is appreciated.
> Never actually tried it, but isn't there a xml-variant for pickling? Maybe
> that helps you.
> Regards,
> Diez

according to my tests it works nicely as a pickle replacement that is at 
least a bit more readable than plain old pickle. Not sure if I'd want to 
edit it by hand though..


More information about the Python-list mailing list