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 know if there's a good way to do exactly what you're asking for. However, if you really want to reset *everything*, you could replace the current process with a fresh interpreter by calling os.execlp("python"). -- http://mail.python.org/mailman/listinfo/python-list