fluiddyn.io.query

Utilities to query (fluiddyn.io.query)

fluiddyn.io.query.query_yes_no(question, default='yes')[source]

Ask a yes/no question and return the answer.

Parameters:
questionstring

String that is presented to the user.

defaultbool

The default answer if the user just hits <Enter>. It must be “yes” (the default), “no” or None (meaning an answer is required of the user).

Returns:
answerbool

The returned answer.

Functions

call_bash(commands)

num_from_str(s)

Return a num computed from a string.

query(question[, default])

Query an anwer to a general question.

query_number(question)

Query a number.

query_yes_no(question[, default])

Ask a yes/no question and return the answer.

run_asking_agreement(command)

Use query_yes_no to ask if a command should be run.