Hi people I've written a complex program in python/numpy/scipy which creates a dictionary of objects(which takes a while to create). I am hoping to save these objects to disk and then access them using a different session, thus bypassing the time to create the objects.
My initial tests using pickle and a simple class system (shown below) have failed. The method shown below fails with a AttributeError: 'FakeModule' object has no attribute 'Spod', so when I create a an empty class Spod in the new session, it generates an IndexError:(list index out of range) Is there a better way to do this? Andy class Spod: def __init__(self, name): self.name=name fish = Spod("andy") file = open("test.pickle","w") pickle.dump(fish, file) # New session file = open("test.pickle","r") pickle.load(file) _______________________________________________ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor