This might be a general question. I'm modifying a Python code wrote by former colleague. The main purpose of the code is
- Read some file from local
- Pop out a GUI to do some modification
- Save the file to local
The GUI is wrote with Python and Tkinter. I'm not very familiar with Tkinter actually. Right now, I want to implement an auto-save function, which runs alongside Tkinter's mainloop(), and save modified files automatically for every 5 minutes. I think I will need a second thread to do this. But I'm not sure how. Any ideas or examples will be much appreciated!! Thanks
Just like the comment says, use 'after' recursion.
Threaded solution is possible too:
before leaving I use sys.exit() to kill all running threads and gui. Not sure is it proper way to do it or not.