'Prompt user to choose from a tuple of string values.
If a default is not specified the question will be repeated
until the user gives a valid choice.
Matching is case insensitive.
Arguments:
q (str): the question to ask (don\'t include questionark)
choice (Tuple[str]): tuple of possible choices, must be lowercase.
default (Any): Default value if any.'

def ask(self, q, choices, default=None):

    schoices = choices
    if (default is not None):
        schoices = [(c.upper() if (c == default) else c.lower()) for c in choices]
    schoices = u'/'.join(schoices)
    p = u'{0}    ({1})?    '.format(q.capitalize(), schoices)
    while 1:
        val = input(p).lower()
        if (val in choices):
            return val
        elif (default is not None):
            break
    return default
