Hi, we have our application written in Agilent VEE. From our application we want to manage a network tester equipment. The network tester provides us with TCL API functions to control it. Agilent VEE application does not work with TCL at all. So we would like to develop a TCL interpreter that running on localhost. This TCL interpreter is supposed to load network test TCL API package and open a socket to accept API commands or even scripts from our Agilent VEE application. Any ideas where should we start? [AMG]: It's pretty easy to glue an [interp]reter [eval] loop to a Tcl TCP/IP [socket], but you have to come up with a network protocol that you can use in VEE. I know nothing about VEE, so I'm no help there. Here's some simple code: ====== package require Tcl 8.4 proc accept {sock peeraddr peerport} { fconfigure $sock -buffering line set slave [interp create] set script "" while {[gets $sock line] != -1} { append script $line\n if {[info complete $script]} { puts $sock [list [catch [list $slave eval $script] result] $result] set script "" } } interp delete $slave close $sock } set serv [socket -server accept 9999] vwait forever ====== This program listens on TCP port 9999. When a connection is made, it reads a line of text and adds it to its script buffer. If the script buffer is complete (no mismatched open braces and brackets), it evaluates it in a slave interpreter, and the result is sent back to the client. Only one connection may be made at a time. The result is formatted as a two-element Tcl list followed by a newline. The first element is 0 if the script executed without error, 1 if there was a problem. The second element is the result, which is either the normal return value or the error message. An empty result is indicated by "0 {}" followed by newline. Newline is a CR/LF pair. For more information on how Tcl lists are formatted, see the [Dodekalogue]. Try it out using [telnet] to see how it behaves. For more advanced ideas, you can have a look at the [comm] package (source: [http://tcllib.cvs.sourceforge.net/viewvc/tcllib/tcllib/modules/comm/comm.tcl?view=markup]). <> Networking