En Tue, 21 Oct 2008 10:31:58 -0200, Митя <[EMAIL PROTECTED]> escribió:
Thank you! I have already implemented custom load/save operations without pickle. And they work fine on atexit. Just for information: pickle.dump worked OK when called manually, but being called by atexit it produeced the above described error. I don't know why.
This small example (based on your code) worked fine for me: import atexit from pickle import dump class _Register(object): def dump(self): dump(self.items, open("x.xxx","wb"), -1) class Registerable(object): pass g_register = _Register() atexit.register(g_register.dump) g_register.items = [Registerable(),Registerable()] -- Gabriel Genellina -- http://mail.python.org/mailman/listinfo/python-list