Interactivity¶
Prompts read single keystrokes, so they require an interactive terminal.
When standard input is not a TTY (for example a pipe or a CI job),
prompts raise NotInteractiveError before rendering anything.
Keybindings¶
Interrupts¶
While a prompt is running:
Ctrl+C raises
KeyboardInterrupt.Ctrl+D (or Ctrl+Z on Windows) raises
EOFError.
Handle both as you would for any other input() call.