Where is Expect?

Posted by kevinw on 2006-07-12 14:33
OS: All / Any | Product: ActiveTcl | tags: activetcl expect package
Question: 

Where is Expect? Older versions of ActiveTcl had an expect executable, but the new versions don't. Where did it go? Why doesn't ActiveTcl 8.5 seem to have Expect anywhere?

Answer: 

Are you running a 64-bit ActiveTcl on Windows?
Expect has not been ported to 64-bit Windows. A Windows 64-bit port of Expect is not trivial, and may not be possible.

-------------------------------------------

Are you running ActiveTcl 8.5.x or 8.6.x?
With ActiveTcl 8.5.x and 8.6.x, the number of extensions shipped with ActiveTcl is limited. This controls size bloat in the installers. Expect is not included inside the installer for ActiveTcl 8.5 or 8.6.

Modules can be downloaded and installed over the internet for ActiveTcl 8.5 and 8.6 through the TEApot package manager. With ActiveTcl installed, Expect can be added from the command line with:
teacup install Expect
You may need to set up your environment if you are running behind a firewall or proxy server. See the user manuals for teacup (or ActivePerl's PPM manager since it requires the same setup).

There is no stand-alone installer for Expect, or any other Tcl package. A package is not a stand-alone product. You must use the framework of TEApot, or find the source-code on the internet and compile/install the package manually.

-----------------------------------------

Are running ActiveTcl 8.4.x?
Rather than being linked to a different interpreter, in recent versions of ActiveTcl 8.4, Expect has been made into a proper Tcl package. If you have the line:

package require Expect

In your source file before the first use of any Expect functions or variables, you can then run the file using tclsh, without having to use a special interpreter.

------------------------------------------

The TEAPot distribution process has an additional benefit, especially important if you cannot get internet access for TEApot. It is possible to install an 8.5 release ON TOP of (into the same directory) an 8.4 release. This gives you both tclsh and tclsh8.5, wish and wish8.5, fully working demos, plus the complete set of modules shipped with 8.4 which are also all compatible with 8.5.

If you wish to have both 8.4 and 8.5:
-You MUST install 8.4 first. (If you already have 8.5 only, it should be uninstalled.)
-It is always advisable to manually delete any files left behind in the ActiveTcl install directory when changing versions.
-You should use a compatible pairing. The most compatible pairings are:

ActiveTcl 8.4.20.0 with 8.5.14.0 and higher
ActiveTcl 8.4.19.6 with 8.5.11.1 to 8.5.13.0
ActiveTcl 8.4.19.5 with 8.5.9.2 to 8.5.11.0
ActiveTcl 8.4.19.4 with 8.5.8.2 to 8.5.9.1
ActiveTcl 8.4.19.3 with 8.5.8.1
ActiveTcl 8.4.19.2 with 8.5.8.0
ActiveTcl 8.4.19.1 with 8.5.3.0 to 8.5.7.0
ActiveTcl 8.4.19.0 with 8.5.2.0
ActiveTcl 8.4.18.0 with 8.5.1.0
ActiveTcl 8.4.17.0 with 8.5.0.0.283511

All 8.4 versions now require Business Edition licenses.

grahams
ActiveState Staff
Tue, 2008-02-12 14:29

If teacup reports 404 errors when installing Expect, or any other extension, it usually means that the ActiveState Teapot repository is offline for updating. This can happen any time between 4 AM and 11 AM Pacific Time. If it happens, try again in a few minutes. Generally, updates take no longer than half an hour.

Muthu | Wed, 2008-11-12 05:25

Successfully installed Expect after tcl 8.5 using
teacup install Expect, as shown below:

Installing into C:/Tcl/lib/teapot

Installing package Expect 5.43 win32-ix86

Problems which occurred during the operation:
* http://teapot.activestate.com : Sizes not matching for compresse
The system used slow(er) remote queries to keep working.

issue:
when tried to give the command
"package require Expect" from tclsh85, it went in vain as:

% package require Expect
Your license file for Expect for Windows is invalid.
To purchase or upgrade a license, or to obtain a free evaluation license pleas
visit: http://www.ActiveState.com/Products/ASPN_Tcl

Email: Sales@ActiveState.com
Toll-free (North America): 1.866.866.2802
Phone: 604.484.6800
Fax: 604.484.6499

1. can anyone throw light to solve this issue?
2. tried removing & installing Expect again :(
is the above the correct way to install Expect?

looking forward to your solution.
thanks :)

grahams
ActiveState Staff
Fri, 2009-03-20 10:58

Muthu, you have ActiveTcl 8.3 binaries in your install tree. You have to get rid of them.

The most common way this happens is installing "Expect for Windows".

"Expect for Windows" is not available on our main website because it has been discontinued for many years. "Expect for Windows" was a licensed version of Expect for use with ActiveTcl 8.3.x. When ActiveTcl 8.4 was released, Expect became free, and all further sales of new licenses for "Expect for Windows" was suspended. "Expect for Windows" remains available through alternative links as a service to the few remaining users of ActiveTcl 8.3 who have existing licenses for "Expect for Windows" and may need to re-install for some reason.
*Edit - The "Expect for Windows" binaries for ActiveTcl 8.3 were completely removed from the website in 2010 because too many 8.4 and 8.5 users were mistakenly installing them.

Unfortunately, installing the old "Expect for Windows" product on top of ActiveTcl 8.5 will render both products unusable.

You will need to uninstall "Expect for Windows". Then un-install ActiveTcl 8.5 (and 8.4 if you have that installed in the same directory). Finally, you must manually delete all files and folders left behind in the ActiveTcl installation directory. Then you can start to re-install. Choose one of the processes at the top of this post to get Expect in a version that will be compatible with ActiveTcl 8.5.x.

triduong | Sat, 2010-03-27 16:37

I have a trial sw version with Active tcl pro but cannot acess expect

Please help

Thanks

susja | Thu, 2010-11-11 07:29

Hello,
Could someone plz help me?
I have a simple task i.e. run autoexpect program to automate telnet. I was able to do it on my Solaris box but I am stuck on my Windows XP box.
Here's what I did:
1. downloaded expect-5.43.tar to my local drive, untar it and have Expect located at C:\.... . I tried to execute 'autoexpect' but it says: "'autoexpect' is not recognized as an internal or external command"
2. I installed ActiveTcl 8.5.9. Successfully ran 'teacup install Expect'.
3. Here I'm blocked: how now I could execute autoexpect program?

thanks in advance

grahams
ActiveState Staff
Fri, 2011-05-06 12:04

Autoexpect is a linux/Unix program. The Windows port of Expect does not include autoexpect.

alpaslanyagcioglu | Thu, 2011-05-05 08:06

I have installed 8.6 8.5 8.4 but none of them I could able to use Expect. I erased everything, also deleted manually. after installed 8.4 but still gives me error.Why is that ?

% teacup install expect
Resolving expect ... Not found in the archives.

Do you possibly mean any of

entity name version platform
------- ------ ------- ----------
package Expect 5.43 win32-ix86
package Expect 5.43.2 win32-ix86
------- ------ ------- ----------
2 entities found
?

Aborting installation, was not able to locate the requested
entity.

child process exited abnormally
%

grahams
ActiveState Staff
Fri, 2011-05-06 12:07

Expect != expect

There is no package named "expect".

It's not clear if you are on 32-bit or 64-bit ActiveTcl. If you are on ActiveTcl 64-bit for Windows, there is no Expect at all.

fplatel | Mon, 2011-08-29 23:31

It may sound like a newbie question but I just want to install
the latest version of expect tool.
I installed activetcl 8.6 on a CentOS 4.4 Linux box, then followed the FAQ
and launched "teacup install Expect", it ran successfully, but then I still don't have the "Expect" command.
running "find / -name "*xpect*" on my linux only returns this :
/opt/ActiveTcl-8.6/lib/teapot/package/linux-glibc2.3-ix86/lib/Expect5.45
/opt/ActiveTcl-8.6/lib/teapot/package/linux-glibc2.3-ix86/lib/Expect5.45/libexpect5.45.so
/var/www/html/crm/modules/Versions/ExpectedVersions.php
/usr/share/guile/1.6/ice-9/expect.scm

So, it seems like only a shared lib has been installed, and no "Expect" command ...

Is there something else I have to do or the install wasn't correct ?

Thanks for your help

cgchoffman
ActiveState Staff
Tue, 2012-01-17 14:47

You have to start the tclsh - Simple shell containing Tcl interpreter.

Then try typing:

package require Expect

Cheers,
-Carey

cityprince143 | Fri, 2013-09-20 07:34

I installed Expect 5.43 win32-ix86, succesfully. After that when i enter expect in cmd prompt it throw me
C:\Tcl\bin>expect
'expect' is not recognized as a
operable program or batch file.

i was expecting the version number of expect to be displayed. please help.
Thanks in advance

Regards
Ashok

grahams
ActiveState Staff
Mon, 2013-09-30 12:36

Expect is a package. As a package, it needs a "package require" to load. The old "Expect" interpreters are obsolete, and have been deprecated on most platforms.

lennir | Thu, 2015-10-01 08:17

I've installed the 32-bit community version of TCL 8.6.4. As noted in other posts, Expect is not included in this install. The Windows system on which I installed TCL does not have an internet connection. Therefore, it is not possible to install Expect using Teacup. Is a stand-alone installer for Expect available for Windows?