Re: del behavior 2

2009-01-08 Thread Eric Snow
On Jan 7, 12:42 pm, Eric Snow wrote: > I was reading in the documentation about __del__ and have a couple of > questions.  Here is what I was looking at: > > http://docs.python.org/reference/datamodel.html#object.__del__ > > My second question is about the following: > > "It is not guaranteed that

Re: del behavior 2

2009-01-08 Thread Eric Snow
On Jan 7, 3:23 pm, "Martin v. Löwis" wrote: > > Thanks for the responses.  What I mean is when a python process is > > interrupted and does not get a chance to clean everything up then what > > is a good way to do so?  For instance, I have a script that uses child > > ptys to facilitate ssh connec

Re: del behavior 2

2009-01-07 Thread Martin v. Löwis
> Thanks for the responses. What I mean is when a python process is > interrupted and does not get a chance to clean everything up then what > is a good way to do so? For instance, I have a script that uses child > ptys to facilitate ssh connections (I'm using pxssh). When I ^C the > python proc

Re: del behavior 2

2009-01-07 Thread Marc 'BlackJack' Rintsch
On Wed, 07 Jan 2009 12:03:36 -0800, Eric Snow wrote: > Thanks for the responses. What I mean is when a python process is > interrupted and does not get a chance to clean everything up then what > is a good way to do so? Well, if it doesn't get a chance then it doesn't get a chance. ;-) > For i

Re: del behavior 2

2009-01-07 Thread Eric Snow
On Jan 7, 1:03 pm, Eric Snow wrote: > On Jan 7, 12:57 pm, "Chris Rebert" wrote: > > > > > On Wed, Jan 7, 2009 at 11:42 AM, Eric Snow wrote: > > > I was reading in the documentation about __del__ and have a couple of > > > questions.  Here is what I was looking at: > > > >http://docs.python.org/r

Re: del behavior 2

2009-01-07 Thread Eric Snow
On Jan 7, 12:57 pm, "Chris Rebert" wrote: > On Wed, Jan 7, 2009 at 11:42 AM, Eric Snow wrote: > > I was reading in the documentation about __del__ and have a couple of > > questions.  Here is what I was looking at: > > >http://docs.python.org/reference/datamodel.html#object.__del__ > > > My secon

Re: del behavior 2

2009-01-07 Thread Martin v. Löwis
> I understand that and have seen it too. That's fine. But how do any > of you deal with things that are left open because you did not get a > chance to close them? How do you clean up after the fact? Do you > simply keep track externally the things that need to be cleaned up if > __del__ doesn

Re: del behavior 2

2009-01-07 Thread Chris Rebert
On Wed, Jan 7, 2009 at 11:42 AM, Eric Snow wrote: > I was reading in the documentation about __del__ and have a couple of > questions. Here is what I was looking at: > > http://docs.python.org/reference/datamodel.html#object.__del__ > > My second question is about the following: > > "It is not gu

Re: del behavior 2

2009-01-07 Thread MRAB
Eric Snow wrote: I was reading in the documentation about __del__ and have a couple of questions. Here is what I was looking at: http://docs.python.org/reference/datamodel.html#object.__del__ My second question is about the following: "It is not guaranteed that __del__() methods are called fo