2008/5/21 Marco <[EMAIL PROTECTED]>: > Hi all, > > 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?
You could check from time to time using after(ms, callback). After your callback is called, you have to re-eschedule the check, using after(ms, callback) again. If you don't want to depend on tcl for this, you could use inotify (pyinotify) if you are using Linux. > > Thanks, > > marco > _______________________________________________ > Tkinter-discuss mailing list > Tkinter-discuss@python.org > http://mail.python.org/mailman/listinfo/tkinter-discuss > -- -- Guilherme H. Polo Goncalves _______________________________________________ Tkinter-discuss mailing list Tkinter-discuss@python.org http://mail.python.org/mailman/listinfo/tkinter-discuss