When using tkinter in python, there seems to be some sutble conflict when using tk.update() and tk.mainloop() at the same time.