Expect for Microsoft O/S
Posted by admin (Graham Ellis), 10 August 2002If you're looking for Expect (with Tk include too) for Windows, have a look at:
which give you downloads of Tcl, Tk and Expect all together for windows platforms. It's a mature release - you won't have the advanced regular expression stuff - but beyond that the age shouldn't be a problem. Expect is famous for NOT changing - "Hey - it does all it needs ", but having made that comment the underlying design of Windows operating systems makes them a nightmare for parallel processing applications such as Expect. Don't expect a miracle if you're wanting to do something really complex.
Posted by violetita (violetita), 21 May 2003Ok, I downloaded the zip file. Now how do I install expect if I already have tcl installed.
Posted by admin (Graham Ellis), 21 May 2003I would suggest you install it into a separate directory; what you've downloaded is a complete expect + tcl + tk, and you can't mix and match - in other words, you can't use just the expect part of the download with the Tcl you've already loaded. Expect does some very clever (and very OS dependant) things that force it to be that way ...
Posted by HangGlider (HangGlider), 9 July 2003I've loaded the Expect 5.21 binary on my Win2k machine. The install seems to have worked - except when I try to spawn a batch file, Expect gives me this error message:
spawn ftps1.bat ftp.db.com 991
couldn't execute "ftps1.bat": no such file or directory
"spawn ftps1.bat ftp.db.com 991 "
(file "c:\program files\expect-5.21\bin\nwfcs_ftp_put" line 1)
The batch file is indeed there - I can run it manually and it works. Where is Expect looking for files? What path does it search? I've added the path to the batch file to the Win2k environment - to no avail.
Posted by admin (Graham Ellis), 9 July 2003As a next test, I would try modifying the script to include the entire absolute path in the name of the batch file - a pain, I know, but that way you'll be able to see if it really is a path problem or something else.
There's a page on paths in Don Libe's book on Expect - see
http://www.wellho.net/book/1-56592-090-2.html - chapter 13 (I wonder if that's some sort of pointer ). Basically, it says that Expect follows the same track that the operating system does looking for executables, via the path ... but I don't know that I would rely on that comment for Windows - the Windows operating systems have come on out or all recognition in the past few years, but they're still not as good a base operating system for Expect as Unix and Linux - I'm not being biased, just stating a fact since Expect was written for a Unix platform initially! The book also tells you that in some cases putting an absolute path in is a good idea, and I heartily agree!
PH: 01144 1225 708225 • FAX: 01144 1225 899360 • EMAIL: firstname.lastname@example.org • WEB: http://www.wellho.net • SKYPE: wellho