Reputation: 719
I've the expect script running on linux which I want to run it on windows. I've added
#!/bin/sh
# \
exec tclsh "$0" ${1+"$@"}
package require Expect
lines as well at the start. I'm getting 'can't find package Expect
' error. where can I get that?
Upvotes: 2
Views: 8174
Reputation: 137567
Expect for Windows is done by ActiveState as part of ActiveTcl (no charge for the 32-bit version), which is highly recommended as the definitive batteries-included build of Tcl on the Windows platform. (I'm not sure if Expect for Windows is part of the Community Edition; I'm on a different platform so checking is a little awkward.)
Be aware that there are some substantial differences between Unix and Windows under the covers, and Expect is an extension package that gets very deep into the details. It hides nearly all the horrible differences, but not all; advanced scripts may need quite a bit of extra work to port. Also, some Windows executables (notably telnet.exe
) can't be wrapped by Expect because they're marked as special system files, and GUI apps can't be wrapped at all. There are often good alternatives for subordinate processes though.
Upvotes: 1