-------------------- Introduction -------------------- This is the README file for Expect, a program that performs programmed dialogue with other interactive programs. It is briefly described by its man page, expect(1). This directory contains the source and documentation for Expect. Please read CHANGES.3to4 if you have scripts that used Expect version 3 or version 4 alpha or beta. This version of Expect 4 is not intended to run with the beta Tcl 7.0. (I am currently working this.) -------------------- Readings on Expect -------------------- The implementation, philosophy, and design are discussed in "expect: Curing Those Uncontrollable Fits of Interaction", Proceedings of the Summer 1990 USENIX Conference, Anaheim, CA, June 11-15, 1990. Examples and discussion, specifically aimed at system administrators, are in "Using expect to Automate System Administration Tasks", Proceedings of the 1990 USENIX Large Systems Administration Conference (LISA) IV, Colorado Springs, CO, October 17-19, 1990. A comprehensive paper of example scripts is "expect: Scripts for Controlling Interactive Programs", Computing Systems, Vol. 4, No. 2, University of California Press Journals, 1991. Regression and conformance testing is discussed in "Regression Testing and Conformance Testing Interactive Programs", Proceedings of the Summer 1992 USENIX Conference, San Antonio, TX, June 8-12, 1992. An explanation of some of the more interesting source code to Expect itself is in Chapter 36 ("Expect") of "Obfuscated C and Other Mysteries", John Wiley & Sons, 1993. A paper on connecting multiple interactive programs together using Expect is "Kibitz - Connecting Multiple Interactive Programs Together", Software - Practice & Experience, Vol. 23, No. 5, May 1993. The debugger is discussed in "A Debugger for Tcl Applications", Proceedings of the 1993 Tcl/Tk Workshop, Berkeley, CA, June 10-11, 1993. -------------------- How to Get the Latest Version of Expect or the Readings -------------------- Expect may be ftp'd as pub/expect/expect.tar.Z from ftp.cme.nist.gov. Request email delivery by mailing to "library@cme.nist.gov". The contents of the message should be (no subject line) "send pub/expect/expect.tar.Z". Once you have retrieved the system, please read the INSTALL file. The papers mentioned above can be retrieved separately as pub/expect/seminal.ps.Z, pub/expect/sysadm.ps.Z, pub/expect/scripts.ps.Z, pub/expect/regress.ps.Z, pub/expect/kibitz.ps.Z, pub/expect/tcl-debug.ps.Z. The book is not on-line but is available in bookstores or directly from the publisher. While expect.tar.Z contains some example scripts, other interesting scripts are available separately in the pub/expect/scripts directory (retrieved as above). You are welcome to send me scripts to add to this directory. -------------------- Using Expect with and without Tcl and/or Tk. -------------------- The usual way of using Expect is as a stand-alone program. This requires Tcl. Since you may already have Tcl, it is available separately. Tcl may be retrieved as pub/expect/tcl6.7.tar.Z in the same way as described above for Expect. When new releases of Tcl appear, I will try to check them out for Expect as soon as possible. If you would like to get the newest Tcl release without waiting, ftp it from sprite.berkeley.edu. You may request email copies of Tcl by writing to ouster@sprite.berkeley.edu. Expect may also be built using the Tk library, a Tcl interface to the X window system. Tk is available in the same way as Tcl. It is possible to embed the Expect/Tcl core and optionally Tk in your own C programs. This is described in libexptcl(3) and libexptk(3). Expect can also be used from a C or C++ program without Tcl. This is described in libexpect(3). While I consider this library to be easy to use, the standalone Expect program is much, much easier to use than working with the C compiler and its usual edit, compile, debug cycle. Unlike typical programming, most of the debugging isn't getting the C compiler to accept your programs - rather, it is getting the dialogue correct. Also, translating scripts from Expect to C is usually not necessary. For example, the speed of interactive dialogues is virtually never an issue. So please try 'expect' first. I suspect it is a more appropriate solution for most people than the library. -------------------- Systems Supported -------------------- I do not know of any systems which Expect will not run on. Systems which do not support select or poll can use Expect, but without the ability to run multiple processes simultaneously. I am willing to work with you to complete a port. -------------------- Installing Expect -------------------- Read the INSTALL file. -------------------- History -------------------- Expect was conceived of in September, 1987. The bulk of version 2 was designed and written between January and April, 1990. Minor evolution occurred after that until Tcl 6.0 was released. At that time (October, 1991) approximately half of Expect was rewritten for version 3. See the HISTORY file for more information. The HISTORY file may be retrieved separately as pub/expect/HISTORY. Around January 1993, an alpha version of Expect 4 was introduced. This included Tk support as well as a large number of enhancements. A few changes were made to the user interface itself, which is why the major version number was changed. A production version of version 4 was release in August 1993. Work is currently in progress on a version of Expect for Tcl 7.0. This documentation and software distribution is version 4 of Expect. The papers listed above correspond to version 2 and 3, although they are still the best introduction to Expect. There are important differences between version 3 and 4. See the CONVERTING file if you want to read about them. Expect 3 has ceased further development and will no longer be supported. However, if for some reason you want the old code, it is available from pub/expect/old as described below. -------------------- Support -------------------- Although I can't promise anything in the way of support, I'd be interested to hear about your experiences using it (either good or bad). I'm also interested in hearing bug reports (please include version # reported by expect -d) and suggestions for improvement even though I can't promise to implement them immediately. Awards, love letters, and bug reports may be sent to: Don Libes National Institute of Standards and Technology Bldg 220, Rm A-127 Gaithersburg, MD 20899 (301) 975-3535 libes@cme.nist.gov or uunet!cme-durer!libes Design and implementation of this program was paid for by U.S. tax dollars. Therefore it is public domain. However, the author and NIST would appreciate credit if this program or parts of it are used. -------------------- Cygnus Support -------------------- Cygnus Support provides commercial support for Expect (as well as Tcl and Tk). If your company has a financial investment in Expect or you wish to be assured of continuing support for Expect, you can buy a support contract this way. Cygnus may be reached at: Cygnus Support 1937 Landings Drive Mountain View, CA 94043 +1 (415) 903-1400 info@cygnus.com Neither I nor NIST has any commercial relationship with Cygnus. Cygnus is in the process of signing an agreement with NIST that describes its non-exclusive position to support Expect. Other companies are welcome to apply for such an agreement or other kinds of agreements such as permission-to-use. Strictly speaking, such agreements are not necessary, however they make us look good to our funding source, the U.S. Congress.
These are the contents of the former NiCE NeXT User Group NeXTSTEP/OpenStep software archive, currently hosted by Netfuture.ch.