Readable Persistance?

Simon Dahlbacka sdahlbacSPAMSUCKS at abo.fi
Mon Jun 21 13:27:34 EDT 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
> 
> 
http://gnosis.cx/download/Gnosis_Utils-current.tar.gz

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..

/Simon




More information about the Python-list mailing list