def validate_integer(self, action, index, value_if_allowed, prior_value,<EOL>text, validation_type, trigger_type, widget_name):
if(action == '<STR_LIT:1>'):<EOL><INDENT>if text in '<STR_LIT>':<EOL><INDENT>try:<EOL><INDENT>int(value_if_allowed)<EOL>return True<EOL><DEDENT>except ValueError:<EOL><INDENT>return False<EOL><DEDENT><DEDENT>else:<EOL><INDENT>return False<EOL><DEDENT><DEDENT>else:<EOL><INDENT>return True<EOL><DEDENT>
Check if text Entry is valid (number).

        I have no idea what all these arguments are doing here but took this from
        https://stackoverflow.com/questions/8959815/restricting-the-value-in-tkinter-entry-widget