On Oct 20, 10:12 am, Митя <[EMAIL PROTECTED]> wrote: > But when g_register is being destroyed, dump seems to be already dead, > so I get: > > Exception exceptions.TypeError: "'NoneType' object is not callable" in > <bound method __Register.__del__ of <MyWiki.Register.__Register object > at 0x835a74c>> ignored > > can I somehow save my data from destructor?
The best thing is to use the 'with' statement, but it requires you to rewrite all of your code. Alternatively you can use the atexit module. I wrote once a recipe that may be of interest to you: http://code.activestate.com/recipes/523007/ -- http://mail.python.org/mailman/listinfo/python-list