# -*- coding: utf-8 -*- try: import cPickle as pickle except: import pickle class cucumber: # you have to include the class definition, but it doesn't have to be identical to the class that saved it def __init__(self): #although that is probably safest self.brand = "Ingles" def volume(self): return self.length * self.width FILE = open("picklejar.sav", 'r') cc = pickle.load(FILE) FILE.close() print cc.color print cc.volume() print cc.brand #see how the class __init__ is not called on unpickling--the object is exactly as it was saved.