[Tutor] general basic question
Joel Goldstick
joel.goldstick at gmail.com
Wed Feb 8 23:14:31 CET 2012
On Wed, Feb 8, 2012 at 4:28 PM, ken brockman <krush1954 at yahoo.com> wrote:
> Got it. I manage to get it to save to disk, but only by using the shell to
> create an empty dictionary then pickling it and saving it to a file. Priming
> the pump as it were. I had thought i had read that when you pickle and save
> a list or dictionary to file, if it didn't already exist, it would be
> created. That hasn't been my experience. Had I misunderstood or Am i doing
> something wrong?
>
> Let me see if I understand your problem. You are pickling a dictionary and
> finding that it will not work unless there already is an existing dictionary
> for your pickled dictionary to write over. Otherwise, there is either no
> write at all or the write is followed by a delete. Is that a reasonable
> definition of your current problem?
>
> Robert Berman
>
> Really close to it Robert. No delete but an error msg. Something akin to
> file dosen't exist, not found , or words to that effect .
> Ken
>
> _______________________________________________
> Tutor maillist - Tutor at python.org
> To unsubscribe or change subscription options:
> http://mail.python.org/mailman/listinfo/tutor
>
Ken,
The best way to get help here is to post a small example of your code
that shows the problem, along with the complete traceback. Although
at first they seem a little daunting, the traceback will make the
problem obvious
--
Joel Goldstick
More information about the Tutor
mailing list