Philipp H. Mohr wrote:
> Hello,
> 
> I would like to store multiple dictionaries in a file, if possible one per
> line. 

Why "one per line" ?

> My code currently produces a new dictionary every iteration and
> passes it on to another peace of code. 

May this code rest in piece <grin>

> In order to be able to re-run some
> experiments at a later date I would like to store every dictionary in the
> same file.
> I looked at pickel, but that seems to require a whole file for each
> dictionary.
> 
> It would be great if some one could tell me how to do that.

A pretty simple solution could be to store all the dicts in another
container (list or dict, depending on how you need to retrieve'em, but
from what you explain I'd say a list) and then pickle this container.

My 2 cents...
-- 
bruno desthuilliers
python -c "print '@'.join(['.'.join([w[::-1] for w in p.split('.')]) for
p in '[EMAIL PROTECTED]'.split('@')])"
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to