def custom_callback(self, value):
    ' A custom callback for dealing with tool output.\n        '
    if ('%' in value):
        try:
            str_array = value.split(' ')
            label = value.replace(str_array[(len(str_array) - 1)], '').strip()
            progress = float(str_array[(len(str_array) - 1)].replace('%', '').strip())
            self.progress_var.set(int(progress))
            self.progress_label['text'] = label
        except ValueError as e:
            print('Problem converting parsed data into number: ', e)
        except Exception as e:
            print(e)
    else:
        self.print_line_to_output(value)
    self.update()
A custom callback for dealing with tool output.
def custom_callback(self, value):
    ' \n        '
    if ('%' in value):
        try:
            str_array = value.split(' ')
            label = value.replace(str_array[(len(str_array) - 1)], ).strip()
            progress = float(str_array[(len(str_array) - 1)].replace('%', ).strip())
            self.progress_var.set(int(progress))
            self.progress_label['text'] = label
        except ValueError as e:
            print('Problem converting parsed data into number: ', e)
        except Exception as e:
            print(e)
    else:
        self.print_line_to_output(value)
    self.update()