I have to display some print statements (which I get while running a Perl script) in the Tk GUI. I tried to show an example in pictorial format, for example:
Initializing the parser ...
Running the parser ...
Enabling the codec ...
Connected to the socket ...
Sending ipv4 traffic into the code ...
It goes on like this. I don’t know how to do it.
You could run your perl script through
Tk::ExecuteCommandIn general, you need to do some sort of IPC to run a batch and update a Tk GUI. Because IO handles can create events in Tk.
Tk::ExecuteCommandkind of hides the complexity of the IPC.Otherwise, you can design the IPC scheme of your own. Probably (roughly put) pipe, fork, and setup pipe events as a IO event, and the crucial commands to make a read-only log are: