In python curses, if I draw a sub-window using scr.subwin() to get input with getstr() function as below
search_box = screen.subwin(3, 30, 20, 30)
search_box.clear()
search_box.box()
search_box.addstr(1, 1, "GoTo:")
search_box.refresh()
curses.echo()
new_x = int(search_box.getstr(1, 6, 20))
search_box.clear()
and I decide not provide any input. How can I escape new sub-window?
Thanks
I have resolved my problem as following