def update_stack(self, stack):
        # Retrieve the current stack list
        displayed = self.get_children()

        # Iterate over the entire stack. Update each entry
        # in the stack to match the current frame description.
        # If we need to add an extra frame, do so.
        index = 0
        for line, frame in stack:
            if index < len(displayed):
                self.item(
                    displayed[index],
                    text=self.normalizer(frame['filename']),
                    values=(line,)
                )
            else:
                self.insert(
                    '', index, 'frame:%s' % index,
                    text=self.normalizer(frame['filename']),
                    open=True,
                    values=(line,)
                )
            index = index + 1

        # If we've stepped back out of a frame, there will
        # be less frames than are currently displayed;
        # delete the excess entries.
        for i in range(index, len(displayed)):
            self.delete(displayed[i])
Update the display of the stack
dataset/ETHPy150Open pybee/bugjar/bugjar/widgets.py/StackView.update_stack