Re: save dictionary for later use?
- From: globalrev <skanemupp@xxxxxxxx>
- Date: Fri, 16 May 2008 13:24:30 -0700 (PDT)
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)
.
- Follow-Ups:
- Re: save dictionary for later use?
- From: bruno.desthuilliers@xxxxxxxxx
- Re: save dictionary for later use?
- From: Hans Nowak
- Re: save dictionary for later use?
- From: jay graves
- Re: save dictionary for later use?
- References:
- save dictionary for later use?
- From: globalrev
- Re: save dictionary for later use?
- From: jay graves
- save dictionary for later use?
- Prev by Date: Arch problems--how do I build PIL to be 64 bit so it plays nicely on OS X?
- Next by Date: encoding problem
- Previous by thread: Re: save dictionary for later use?
- Next by thread: Re: save dictionary for later use?
- Index(es):