SO, I have a class Foo which maps to a directory. When you create Foo, it makes a directory of the form /tmp/foo-pid. I would like for this dir to be removed when the object leaves scope (i.e. when __del__ is called). However this does not seem to work if the object exists when python exists. Any ideas?