How to clear an entire Treeview with Tkinter
Following on from Katze's answer, after you delete the tree you might need to update the window to reflect the changes
for i in tree.get_children(): tree.delete(i)window.update()
You'd have to keep your program in a while true loop instead of a mainloop
while True: if condition_check(): for i in tree.get_children(): tree.delete(i) window.update()