dival.util.input module

dival.util.input.input_yes_no(default='y')[source]

Demand user input y[es] or n[o].

The user is asked repeatedly, until the input is valid.

Parameters

default ({'y', 'n'}, optional) – The output if the user enters empty input.

Returns

inp – The users input (or default).

Return type

{'y', 'n'}