in the time module, look at a function called sleep - arguments are 1 second intervals from memory i.e. something like this:
import time while True: <check file for changes and take appropriate action> time.sleep(5) -- delay for 5 seconds before resuming loop On Thu, May 22, 2008 at 8:59 AM, Cameron Laird <[EMAIL PROTECTED]> wrote: > On Wed, May 21, 2008 at 12:49:22PM +0200, Marco wrote: > . > . > . > > I am quite new to tkinter programming, and i have a question. > > > > I am writing a "monitor": basically it reads a file on the filesystem > > and reports it in a graphical way using python and tkinter. > > > > Now the file, over time, changes, so once called root.mainloop() i'd > > need to reread the file, update the objects in memory and redraw the > > tkinter main window. > > > > How can I achieve that? Ideas? Suggestions? Is my approach wrong? > . > . > . > Poll with after(). Fredrik's references, among others, > explain this. I'll be tied up for a day; if you don't > work out the details on your own, I'll return to explain. > _______________________________________________ > Tkinter-discuss mailing list > Tkinter-discuss@python.org > http://mail.python.org/mailman/listinfo/tkinter-discuss >
_______________________________________________ Tkinter-discuss mailing list Tkinter-discuss@python.org http://mail.python.org/mailman/listinfo/tkinter-discuss