Hello,
this is the solution I went for, as I am indeed not concernt about
security and the implementation is straight forward.
Thank you,
Phil
> If you're not worried about security, you could write the repr() of each
> dict to the file and get the values back by using the eval() function.
> r
You might want to take a look at the shelve module.
-Larry
Philipp H. Mohr wrote:
> Hello,
>
> I would like to store multiple dictionaries in a file, if possible one per
> line. My code currently produces a new dictionary every iteration and
> passes it on to another peace of co
[John Machin]
|
| bruno modulix wrote:
| > Philipp H. Mohr wrote:
|
| >>My code currently produces a new dictionary every iteration and
| >>passes it on to another peace of code.
| >
| >
| > May this code rest in piece
|
| Perhaps it's the piece of code that passeth all understanding?
Th
bruno modulix wrote:
> Philipp H. Mohr wrote:
>>My code currently produces a new dictionary every iteration and
>>passes it on to another peace of code.
>
>
> May this code rest in piece
Perhaps it's the piece of code that passeth all understanding?
--
http://mail.python.org/mailman/listinfo
Philipp H. Mohr wrote:
> I would like to store multiple dictionaries in a file, if possible one per
> line. My code currently produces a new dictionary every iteration and
> passes it on to another peace of code. In order to be able to re-run some
> experiments at a later date I w
Thank you for you answer.
> > I would like to store multiple dictionaries in a file, if possible one per
> > line.
>
> Why "one per line" ?
I agree with you that it sounds like nasty code :-) but there is a good
reason for doing it this way - I think. My code colle
7;: 1}
>>> cp.load(f)
{'b': 1}
>>> cp.load(f)
Traceback (most recent call last):
File "", line 1, in ?
EOFError
>>> f.close()
On Thu, Jun 30, 2005 at 11:32:27AM +0100, Philipp H. Mohr wrote:
> Hello,
>
> I would like to store multiple di
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 r
Hello,
I would like to store multiple dictionaries in a file, if possible one per
line. My code currently produces a new dictionary every iteration and
passes it on to another peace of code. In order to be able to re-run some
experiments at a later date I would like to store every dictionary in