Tcl-Expect Rumors
Expect was originally intended to allow programmatical interaction among various programs on Linux and Unix operating systems. UFT primarily uses Expect to interface with equipment rather than programs.
For a better understanding of why this distinction matters, it is important to understand a few fundamental differences between Windows and Linux. In Linux and Unix everything is a file. Not just most things, not just normal things, everything everything is a file. When opening a file the caller has control over whether and how the input and output pipes are connected – a requirement for interactive control of a command-line program. Since Tcl/Tk is cross-platform it was also ported to Windows, which at the time permitted connection of input and output pipes to the calling program – if the target program was compiled with that in mind. Microsoft uses Windows to sell various products and services, and occasionally introduces new and/or discourages old interfaces for inter-process communication (IPC) such as:
DDE
COM
Shared Memory
File Mapping
Sockets
RPC
ALPC
Compatability
Backward-compatibility has been a historical feature of Windows, but certain features are left by the wayside each time the number of bits in the instruction set increases (16-bit, 32-bit, 64-bit). Expect works with programs written for 16- or 32-bit Windows, such as Cygwin and all of its utilities. Expect for Tcl/Tk also has a handy quirk echoing the entire dialog to the Tcl console – which is really handy in the manufacturing test environment.
Modification
Since UFT primarily uses Expect to interface with equipment rather than programs, Windows restrictions on inter-process communication generally don’t come into play. For occasions where we need Expect to interact with something Windows actively blocks, we developed a Linux bridge. Since Expect for Linux does not handily display the entire dialog in the Tcl console like the Windows version does, we added this functionality into the Linux bridge program.
Please leave a comment, and share your own TCL - Expect experience.
To learn more click the button below to contact us.
Comments