Interpreter.focus

Interpreter.focus()

If a curses script is executing through curses.wrapper in this interpreter, this function sets the global terminal instance.

The Python curses module assumes a single global terminal per process. PytoRuntime internally calls the set_term C function to switch between terminals and receive size change notifications among other stuff. This function is intended to be called when the terminal is focused.