Communicating Processes

Chapter 22 presented two examples: a browser for the examples in this book, and a simple shell in which to try out Tcl commands. In that chapter they are put into the same application. The two examples shown below hook these two applications together using the send command. Example 40-2 changes the Run and Reset procedures to send Tcl commands the shell defined in Example 22-4 on page 329. The StartEvalServer procedure starts up the shell, if necessary.

Example 40-2 Hooking the browser to an eval server.
 # Replace the Run and Reset procedures from # Example 22–3 on page 324 with these procedures # Start up the evalsrv.tcl script. proc StartEvalServer {} { global browse # Start the shell and pass it our name. exec evalsrv.tcl ...

Get Practical Programming in Tcl & Tk, Third Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.