Python Forum
[Tkinter] How to run animations in background with tkinter? - Printable Version

+- Python Forum (https://python-forum.io)
+-- Forum: Python Coding (https://python-forum.io/Forum-Python-Coding)
+--- Forum: GUI (https://python-forum.io/Forum-GUI)
+--- Thread: [Tkinter] How to run animations in background with tkinter? (/Thread-Tkinter-How-to-run-animations-in-background-with-tkinter)



How to run animations in background with tkinter? - Pythenx - May-20-2019

Hello! I am making a tkinter app and I want to make an animation, for example, a character walking (by displaying each frame individually). But when I do this, the rest of the commands stop executing and the only thing that happens is the animation, but I want to execute other commands while the animation is running. There must be a better way to animate stuff in tkinter!?


RE: How to run animations in background with tkinter? - Yoriz - May-20-2019

How are you doing the animation? Do you have a while loop and/or sleep blocking the gui mainloop.
See the following forum thread on using tkinter's after
https://python-forum.io/Thread-Tkinter-How-to-deal-with-code-that-blocks-the-mainloop-freezing-the-gui