tags:

views:

28

answers:

1

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 without restarting the window

+1  A: 

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.

Frédéric Hamidi
hey! thanks for the quick solution.. i was just going through timeout_add() :)
Idlecool