Re: save dictionary for later use?



On 16 Maj, 21:22, jay graves <jaywgra...@xxxxxxxxx> wrote:
On May 16, 2:17 pm, globalrev <skanem...@xxxxxxxx> wrote:

i extract info from one file and put it into a dictionary.
i want to save that dictionary for later use, how do i do that?
might save a list of dictionaries or a list of classobjects too if
there is any difference.

use the 'pickle' module.http://docs.python.org/lib/module-pickle.html

...
Jay Graves


pickle.dumps(mg)
pickle.load(mg)

'dict' object has no attribute 'readline'
dumps load(well i dont know but i get no complaint but running load
generates that error)
.