In the python curses documentation, it states the following:
When you call a method to display or erase text, the effect doesn’t immediately show up on the display. Instead you must call the refresh() method of window objects to update the screen.
As a result, I would expect the follow code NOT to display "hello world":
import curses
from curses import wrapper
def main(scr):
scr.clear()
scr.addstr("hello world!")
scr.getkey()
wrapper(main)
And yet, running this in my terminal produces "hello world!". Why is this?