G'day amboxer21,
"is it possible to run a command every x seconds? Lets say i wanted to watch for new lines in a file and if there is a new line, parse the line for a specific word and add that word to a button on a tk UI? Continue to do so as long as new lines are added tot hat file?"
Yes. Take a look at these (and related information they link to):
There's plenty of examples of using both of those on this site (use Super Search).
Important: Using sleep in a Tk application (as suggested in other responses) is a very bad idea because it interferes with the event loop (started by MainLoop).
You'll also need the -textvariable option (described in Tk::options) to change the text of your Tk::Button.
-- Ken
In reply to Re: run command every x seconds
by kcott
in thread run command every x seconds
by amboxer21
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |