I'm using Tkinter for a small overlay on a screen that got to be update every 1 or 2 second. I search a lot about it and find the after() function that could be execute after the mainloop. But this one doesn't work quitely, the idea is to call a after() function witch contain another after() function and the main function that we want to execute in the loop, like that :
def my_functions():
print('task done')
ws.after(1000, my_functions)
ws.after(1000, my_functions())
But this one got a limit of "function calling itself" of 992, that means my window will refresh her value only for 16 min 32 sec (or 992 sec) then will crash. I could maybe destroy and recreate all my window and loop before the limit but I doesn't love this solution and I would have to work a lot on it, I would prefer a easyest solution, but I'm searching for 3 days and doesn't find anything good.