Hello,

If it's specifically about a dictionary, try also the following:
import shelve
help(shelve)

A shelve is a persistent dictionary.
 Cheers!!
Albert-Jan 


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
All right, but apart from the sanitation, the medicine, education, wine, public 
order, irrigation, roads, a fresh water system, and public health, what have 
the 
Romans ever done for us?
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 




________________________________
From: शंतनू <[email protected]>
To: C.T. Matsumoto <[email protected]>
Cc: python-tutor <[email protected]>
Sent: Tue, December 14, 2010 9:54:00 AM
Subject: Re: [Tutor] Generating a python file





On Tue, Dec 14, 2010 at 14:18, C.T. Matsumoto <[email protected]> wrote:

Hello,
>
>Is it possible to create files containing python code in the same sort of way 
>that you can generate text files.
>
>A simple example perhaps could be a persistent dictionary. Keys and values are 
>written to the dictionary in a file, that can be imported later.
>

http://docs.python.org/library/pickle.html is your friend.

HTH.



      
_______________________________________________
Tutor maillist  -  [email protected]
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor

Reply via email to