cratepy.ioput.ioutilities.query_yn

query_yn(question, default_answer='yes')[source]

Prompt the user to answer yes/no question.

Parameters:
  • question (str) – Yes/No question.

  • default_answer ({'yes', 'no'}, default='yes') – Default answer to yes/no question.

Returns:

boolTrue if answer if ‘yes’, False if anwers is ‘no’.

Return type:

bool