save a dictionary in a file

Stelios Xanthakis sxanth at ceid.upatras.gr
Tue Nov 16 01:26:13 EST 2004


Luis P. Mendes wrote:

> 
> Is there a more commonly used form to do it, yet in a simple way?
> 

Yes. If the dictionary contains only strings, numbers, lists and tuples 
of strings, numbers, and lists and tuples, of (infinite resursion. 
program halted)

You can

  FILE.write ('D=' + str (D))

and then execfile the file.



Stelios



More information about the Python-list mailing list