carputils
Doxygen code documentation for the python framework controlling openCARP
Functions
carputils.prompt Namespace Reference

Functions

def query_yes_no (question, default="yes")
 Ask a yes/no question via raw_input() and return the answer. More...
 
def query_folder (question, default="append")
 Process the output of asking a questions. More...
 

Function Documentation

◆ query_folder()

def carputils.prompt.query_folder (   question,
  default = "append" 
)

Process the output of asking a questions.

Parameters

question str Question to be presented to the user default str or None The default answer if the user just hits <Enter>. It must be "yes" (the default), "no" or None (meaning an answer is required from the user).

Returns

bool The answer to the query

◆ query_yes_no()

def carputils.prompt.query_yes_no (   question,
  default = "yes" 
)

Ask a yes/no question via raw_input() and return the answer.

Parameters

question str Question to be presented to the user default str or None The default answer if the user just hits <Enter>. It must be "yes" (the default), "no" or None (meaning an answer is required from the user).

Returns

bool The answer to the query