Perl/Tk saves your favourite tools

Main
back: Atsar connection
next: Atsar encap -2

(source) First, let us have a try to process the text output of atsar. This requires a few different things, which I will discuss on different slides, but are mixed within the real program. The slides show the general idea, although implementation a bit different.

You can not just wait for a line to arrive via the pipe we opened to the command, because that would block the graphical interface. That is why we have to use the fileevent function of Tk, which triggers a callback each time a change in the file-handle emerges.

The output of atsar is in visual columns, which I just bluntly split into the data to be presented in our interface. See next slide.

 
Atsar connection Atsar encap -2

Created by Mark Overmeer with PPresenter on 5 august 2001.