> 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 subwindows and > restore the underlying window again. Is there something that replaces the
> 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 completely flat.
for i in range(1,50000):
    stdscr.refresh()
    win = curses.newwin(10,1,0,2*2*i)
    win.bkgd(' ',curses.A_REVERSE)
    win.refresh()
    curses.napms(1)

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.
-j
_______________________________________________
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor

Reply via email to