curses.unctrl()

curses.unctrl(ch) Return a string which is a printable representation of the character ch. Control characters are displayed as a caret followed by the character, for example as ^C. Printing characters are left as they are.

curses.ungetch()

curses.ungetch(ch) Push ch so the next getch() will return it. Note Only one ch can be pushed before getch() is called.

curses.tigetnum()

curses.tigetnum(capname) Return the value of the numeric capability corresponding to the terminfo capability name capname. The value -2 is returned if capname is not a numeric capability, or -1 if it is canceled or absent from the terminal description.

curses.typeahead()

curses.typeahead(fd) Specify that the file descriptor fd be used for typeahead checking. If fd is -1, then no typeahead checking is done. The curses library does “line-breakout optimization” by looking for typeahead periodically while updating the screen. If input is found, and it is coming from a tty, the current update is postponed until refresh or doupdate is called again, allowing faster response to commands typed in advance. This function allows specifying a different file descriptor fo

curses.tigetstr()

curses.tigetstr(capname) Return the value of the string capability corresponding to the terminfo capability name capname. None is returned if capname is not a string capability, or is canceled or absent from the terminal description.

curses.tigetflag()

curses.tigetflag(capname) Return the value of the Boolean capability corresponding to the terminfo capability name capname. The value -1 is returned if capname is not a Boolean capability, or 0 if it is canceled or absent from the terminal description.

curses.tparm()

curses.tparm(str[, ...]) Instantiate the string str with the supplied parameters, where str should be a parameterized string obtained from the terminfo database. E.g. tparm(tigetstr("cup"), 5, 3) could result in b'\033[6;4H', the exact result depending on terminal type.

curses.textpad.Textbox.stripspaces

stripspaces This attribute is a flag which controls the interpretation of blanks in the window. When it is on, trailing blanks on each line are ignored; any cursor motion that would land the cursor on a trailing blank goes to the end of that line instead, and trailing blanks are stripped when the window contents are gathered.

curses.textpad.Textbox.do_command()

do_command(ch) Process a single command keystroke. Here are the supported special keystrokes: Keystroke Action Control-A Go to left edge of window. Control-B Cursor left, wrapping to previous line if appropriate. Control-D Delete character under cursor. Control-E Go to right edge (stripspaces off) or end of line (stripspaces on). Control-F Cursor right, wrapping to next line when appropriate. Control-G Terminate, returning the window contents. Control-H Delete character backward. Control-J T

curses.textpad.Textbox.edit()

edit([validator]) This is the entry point you will normally use. It accepts editing keystrokes until one of the termination keystrokes is entered. If validator is supplied, it must be a function. It will be called for each keystroke entered with the keystroke as a parameter; command dispatch is done on the result. This method returns the window contents as a string; whether blanks in the window are included is affected by the stripspaces attribute.