How to change text on gtk.label in frequent intervals - PyGTK
I am coding a desktop application which shows contents from text file in a gtk.label, i update that text file, say once in every 15 mints. Are are there any methods to make the application to read the text file in constant intervals and display it with开发者_开发技巧out restarting the window
On all platforms, you can call gobject.timeout_add() to read the file every once in a while, or gobject.idle_add() with an mtime check to do it when the app is idle.
On linux, I'd recommend using pyinotify to monitor the file and re-read it only when it's updated.
精彩评论