Re: within a class, redefining self with pickled file

2005-04-07 Thread Greg Ewing
Sean Blakey wrote: On 7 Apr 2005 15:27:06 -0700, syd <[EMAIL PROTECTED]> wrote: def unpickle(self): self = pickle.load(open(self.getFilePath('pickle'))) Note, however, that you can MODIFY self in-place within a method. You can probably hack together a solution that modifies self.__dict__, self._

Re: within a class, redefining self with pickled file

2005-04-07 Thread Sean Blakey
On 7 Apr 2005 15:27:06 -0700, syd <[EMAIL PROTECTED]> wrote: > def unpickle(self): > self = pickle.load(open(self.getFilePath('pickle'))) > > This evidently does not work. Any idea why? I'd like to be able to > replace a lightly populated class (enough to identify the pickled > version correct

within a class, redefining self with pickled file

2005-04-07 Thread syd
def unpickle(self): self = pickle.load(open(self.getFilePath('pickle'))) This evidently does not work. Any idea why? I'd like to be able to replace a lightly populated class (enough to identify the pickled version correctly) with it's full version that's sitting pickled in a file. As of right