Have a look at the __getstate__ and __setstate__ methods, described in http://python.org/doc/lib/module-pickle.html Alex.