iblrig.tools.ask_user

iblrig.tools.ask_user(prompt, default=False)[source]

Prompt the user for a yes/no response.

This function displays a prompt to the user and expects a yes or no response. The response is not case-sensitive. If the user presses Enter without typing anything, the function interprets it as the default response.

Parameters:
  • prompt (str) – The prompt message to display to the user.

  • default (bool, optional) – The default response when the user presses Enter without typing anything. If True, the default response is ‘yes’ (Y/y or Enter). If False, the default response is ‘no’ (N/n or Enter).

Returns:

True if the user responds with ‘yes’ False if the user responds with ‘no’

Return type:

bool

Parameters: