[Tutor] curses delwin functionality?
jbohren at seas.upenn.edu
Sun Jun 15 20:32:01 CEST 2008
> I'm trying to get my hands on some curses experiences in Python.
> The examples I found don't really tell me how to get rid of
> restore the underlying window again. Is there something that
> curses functionality "delwin"?
> Thanks for any help!
I had the same question, and I performed some simple experiments.
1) Re-assignment. I ran this and watched python's memory usage. It was
for i in range(1,50000):
win = curses.newwin(10,1,0,2*2*i)
It seems that python calls the underlying curses API
delwin(some_window) when some_window goes out of scope. Thus, there is
no need to call something like it explicitly.
Hope this helps.
More information about the Tutor