Re: Unexpected exit of Python script

2009-10-14 Thread Diez B. Roggisch
vicky wrote: > On Oct 14, 5:52 pm, "Diez B. Roggisch" wrote: >> vicky wrote: >> > Hello All, >> >> > I am a new Python user and don't know much about it. >> >> > I just want to know that, due to any reason if a script exits, is >> > their some way to release all the resources acquired by the scri

Re: Unexpected exit of Python script

2009-10-14 Thread vicky
On Oct 14, 5:52 pm, "Diez B. Roggisch" wrote: > vicky wrote: > > Hello All, > > > I am a new Python user and don't know much about it. > > > I just want to know that, due to any reason if a script exits, is > > their some way to release all the resources acquired by the script > > during execution

Re: Unexpected exit of Python script

2009-10-14 Thread Mick Krippendorf
vicky schrieb: > Actually In my system I want to execute some piece of code at the time > of script exit (expected or unexpected) to ensure the release of all > the resources. I don't know how to do that :( You maybe want to use a context manager. Look for 'with statement' and 'contextlib' in your

Re: Unexpected exit of Python script

2009-10-14 Thread Donn
On Wednesday 14 October 2009 14:23:11 vicky wrote: > I just want to know that, due to any reason if a script exits, is > their some way to release all the resources acquired by the script > during execution ? Python cleans-up after itself so I would not worry about that until you are an expert and

Re: Unexpected exit of Python script

2009-10-14 Thread Diez B. Roggisch
vicky wrote: > Hello All, > > I am a new Python user and don't know much about it. > > I just want to know that, due to any reason if a script exits, is > their some way to release all the resources acquired by the script > during execution ? > > Actually In my system I want to execute some pie

Unexpected exit of Python script

2009-10-14 Thread vicky
Hello All, I am a new Python user and don't know much about it. I just want to know that, due to any reason if a script exits, is their some way to release all the resources acquired by the script during execution ? Actually In my system I want to execute some piece of code at the time of script