code: def exit_confirmation(python_input, style='class:exit-confirmation'):
      
      def get_text_fragments():
          # Show "Do you really want to exit?"
          return [
              (style, '\n %s ([y]/n)' % python_input.exit_message),
              ('[SetCursorPosition]', ''),
              (style, '  \n'),
          ]
  
      visible = ~is_done & Condition(lambda: python_input.show_exit_confirmation)
  
      return ConditionalContainer(
          content=Window(FormattedTextControl(get_text_fragments), style=style),   # , has_focus=visible)),
          filter=visible)
docs: Create `Layout` for the exit message.