开发者

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜