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
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
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
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
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
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