Re: save dictionary for later use?
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
.
Relevant Pages
- Re: save dictionary for later use?
... might save a list of dictionaries or a list of classobjects too if ... dumps load(well i dont know but i get no complaint but running load ... (comp.lang.python) - Re: writing large dictionaries to file using cPickle
... dictionaries. ... in that case, cPickle and shelve would be identical, if i ... python's i/o would be that slow... ... or whether it's something specific about pickle? ... (comp.lang.python) - Re: what happened to hash-tables
... read and write dictionaries, may already need more thought for a ... the hash table which are more likely a challenge in a lot of cases. ... Python's pickle and shelve are handy tools to have around, ... by having Lisp already provide much of what is needed. ... (comp.lang.lisp) - Re: writing large dictionaries to file using cPickle
... i could use that's more suitable for large dictionaries? ... how much virtual memory this is taking up compared to how much real ... i think all the work is in the file I/O. ... How long does it take to load that 300MB pickle back into memory ... (comp.lang.python) - Re: writing large dictionaries to file using cPickle
... in total there are about 10 to 15 million lists if we concatenate ... together all the values of every key in 'mydict'. ... what is the fastest way to pickle 'mydict' into a file? ... i could use that's more suitable for large dictionaries? ... (comp.lang.python) |
|