Python - How to pickle yourself?
- by Mark
I want my class to implement Save and Load functions which simply do a pickle of the class. But apparently you cannot use 'self' in the fashion below. How can you do this?
self = cPickle.load(f)
cPickle.dump(self,f,2)