reconstruct list and dictionary from file
Satchidanand Haridas
sharidas at zeomega.com
Mon Aug 16 02:52:10 EDT 2004
Steve Perry wrote:
>I have a serialized list and dictionary stored in a file, with the
>following format:
>
>mydata:
> color ["red" "green" "blue"]
> origin [0.0 13.2 9.2]
> datasource1 {server:"server1.domain" username:"client"
>password:"secret"}
>
>
>
Is the above format the only way you want to store the serialized list?
I ask because (and in case
you aren't already aware of the 'execfile' method), if you can store
'mydata' in the form of legal Python expressions,
you can use the 'execfile' method to create live objects out of the
data-structures stored in the list.
Regards,
Satchit,
>Is there any APIs to reconstruct the mydata object back with the list
>and dictionary recreated in it?
>
>Thanks,
>
>Steve
>
>
>
>__________________________________
>Do you Yahoo!?
>Read only the mail you want - Yahoo! Mail SpamGuard.
>http://promotions.yahoo.com/new_mail
>
>
More information about the Python-list
mailing list