def getIntUserResponse(uio, prompt, allowQuit=True):
    """Get int repsonse from user.
       If allowQuit is True and the user enters q then None is returned to
       indicate that the user selected quit."""
    while True:
        response = uio.getInput(prompt=prompt)

        try:

            return int(response)

        except ValueError:

            uio.info("%s is not a valid integer value." % (response))

        if allowQuit and response.lower() == 'q':
            return None