Re: Free Memory

2008-05-11 Thread Gabriel Genellina
En Sun, 11 May 2008 01:06:13 -0300, Patrick Mullen <[EMAIL PROTECTED]> escribió: > Yeah I don't know much about locals or globals. I've never used them > before, just know they are there. But anyway, to illustrate what I meant by > the interesting behavior, here is the output (and sorry for it b

Re: Free Memory

2008-05-10 Thread Patrick Mullen
Yeah I don't know much about locals or globals. I've never used them before, just know they are there. But anyway, to illustrate what I meant by the interesting behavior, here is the output (and sorry for it being so long): IDLE 2.6a2 >>> globals() {'__builtins__': , '__name__': '__main__', '__d

Re: Free Memory

2008-05-10 Thread Gabriel Genellina
En Fri, 09 May 2008 12:44:21 -0300, Patrick Mullen <[EMAIL PROTECTED]> escribió: > I had some very interesting results with this code to do what is asked: > > for key in globals().keys(): > del globals()[key] > for key in locals().keys(): > del locals()[key] Removing items from locals() h

Re: Free Memory

2008-05-09 Thread Patrick Mullen
I had some very interesting results with this code to do what is asked: for key in globals().keys(): del globals()[key] for key in locals().keys(): del locals()[key] It might be better to reverse the two steps, I didn't give it much thought. Anyway, when this is done, all of the builtins

Re: Free Memory

2008-05-09 Thread Christian Heimes
Dark Wind schrieb: > Hi, > > How can I free all the memory in python by deleting all variables. I am > looking for the equivalent of 'clear' from Matlab. > > I know del x deletes a variable x, but it doesn't free all the available > memory. del doesn't free an object. It only removes one referen

Re: Free Memory

2008-05-08 Thread Ian Kelly
On Thu, May 8, 2008 at 6:30 PM, Dark Wind <[EMAIL PROTECTED]> wrote: > Hi, > > How can I free all the memory in python by deleting all variables. I am > looking for the equivalent of 'clear' from Matlab. > > I know del x deletes a variable x, but it doesn't free all the available > memory. I don't