Beispiel #1
0
    def generate_table(self, show_message):
        # convert the entered string into a standard format
        expression = self.entry.get()
        print("Expression: {}".format(expression))

        # validate that the expression is consistant with the rules
        try:
            expression = EP.format_expression(expression)
            EP.validate(expression)
            # generate table
            # draw table
        except EP.InvalidExpressionException as ex:
            if show_message:
                messagebox.showinfo('Error', ex)
        except Exception as ex:
            print('Unexpected exception! Exception message: {}'.format(
                ex.message))