How to run a function in the background of tkinter

后端 未结 5 2165
独厮守ぢ
独厮守ぢ 2021-01-04 21:48

I am new to GUI programming and I want to write a Python program with tkinter. All I want it to do is run a simple function in the background that can be influenced through

5条回答
  •  梦谈多话
    2021-01-04 22:12

    You will find the answer in this other question Tkinter locks python when Icon loaded and tk.mainloop in a thread.

    In a nutshell, you need to have two threads, one for tkinter and one for the background task.

提交回复
热议问题