import curses import curses.textpad def func(win): global screen screen = curses.textpad.Textbox(win).edit() curses.wrapper(func) print(screen)