Where is Expectk ?

Posted by dennisne on 2016-11-24 19:30
Forums: Expect discussion | OS: All / Any

I used Expect for awhile on one project many years ago, and have pretty much forgotten everything I once knew, so please view this "noobie" question in that light. The original book by Don Libes, chapter 19 mentions a companion program called Expectk (Expect + Tk). I cannot seem to find it in any open source repositories or sites. Yet the README file of the most recent .tar.gz file that I downloaded from the Expect home page still mentions it. Does anybody know where I can get this companion program, or if it no longer in use, why that is so?
Thank you.

i-shenl
ActiveState Staff
Fri, 2016-11-25 08:45

A google search seems to indicate that Expectk is a package in Ubuntu or Fedora that you would add by either using apt-get or yum.

https://www.rpmfind.net/linux/rpm2html/search.php?query=expectk

Unfortunately I don't know if a Windows version of Expectk exists.

dennisne | Fri, 2016-11-25 13:31

Thank you very much. I appreciate the info. I did not know that rpmfind could be used to discover other types of packages.

grahams
ActiveState Staff
Fri, 2016-11-25 09:05

See this FAQ:
https://community.activestate.com/faq/where-expect

At the time the book you are reading was written, it was common practice to compile Expect as a binary comprised of Tcl with the Expect code static linked into it. That gave you a useful but completely inflexible tool.

ExpecTK was an extension of that idea. A static linked binary combining Tcl + Tk + Expect so that you could do Tk graphics while you ran Expect.

This is obviously self limiting. You would have needed to compile a different binary every time you want to add another Tcl extension to an Expect. The superior solution that emerged about ten years ago with Tcl 8.4 was to modify the way Expect started up and convert it to a fully fledged Tcl module. Once that was complete, Expect was no longer a "Precious" package, and the standalone binaries were obsolete.

With today's versions you don't get a separate Expect binary. You load Expect like any other module into a Tcl interpreter to get the old "expect" and into a Wish interpreter to get the old "ExpecTK", and you can load tls or sqlite3 or itcl as you wish.

dennisne | Fri, 2016-11-25 13:33

Thank you very much grahams. Very clear, complete, and helpful. I look forward to getting in to Tcl and expect again. You don't know any firms that ar looking for Tcl skills do you? :)