Re: cPickle

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • =?ISO-8859-1?Q?Gerhard_H=E4ring?=

    Re: cPickle

    gopal mishra wrote:
    I have 3 objects and want to save in one pickle file.
    >
    I used cPickle to dump 3 objects in a pkl file
    >
    i.e cPickle.dump(ob ject1, fileobject, -1)
    >
    cPickle.dump(ob ject2, fileobject, -1)
    >
    cPickle.dump(ob ject3, fileobject, -1)
    >
    >
    >
    I have changed the 3^rd object and want to save the updated 3^rd object
    in the pickle file.
    >
    I have to dump all the 3 objects again.
    >
    Is there any way to dump only the 3^rd object in to the pkl file.
    No, there isn't. You could, of course, save each object in its own
    pickle file. Or use an object database like ZODB instead.

    -- Gerhard

Working...