def int_input(prompt="Text for prompt"):
    """This function prompts for an integer, and loops until it gets one"""
    while True:
        try:
            return int(input(prompt))
        except ValueError:
            print("Input not a valid integer, please try again...")