keyboard_waitfor#

statrl.settings.markovdecisionprocess.discrete_nostructure.agents.Human.keyboard_waitfor(list)[source]#

Block on stdin until the user types one of the allowed strings.

Parameters:

list (sequence of str) – Accepted inputs. Anything else is silently re-prompted.

Returns:

The string entered and its position in list.

Return type:

tuple of (str, int)