[Tutor] ensuring a __del__ method happens

Sean 'Shaleh' Perry shaleh@valinux.com
Mon, 26 Mar 2001 16:31:39 -0800 (PST)


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?