So, you need to rewrite your system commands to use a piped open, and then a fileevent on the file handle provided by the piped open. Look at this code-->tk-ps for an example. There are many Tk examples already on google for searching. Remember to use timers to repeat things, and generally use fileevent for remote file or socket operations. You can get away with a quick "my $data = system ("cat $file |"); but you are better off avoiding anything which interferes with the eventloop. Especially for reading sockets or pipes, when the file is coming in a piece at a time.
For loading a simple file into Tk Text, google for perl tk open file for display as text. The code has all been posted before, so you may as well learn to search for it yourself. :-)
I see you seem to be reading usb buses, which probably act like a socket. See Re: hanged In Tk-socket program for some code.
In reply to Re: text from 2nd file not displaying in scrolledwindow
by zentara
in thread text from 2nd file not displaying in scrolledwindow
by amboxer21
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |