Live data from Hacker News

Expect – A tool for automating interactive applications

expect.sourceforge.net

21–30 of 52 posts

Re: Expect – A tool for automating interactive applications

#21

It's very frustrating to see something like this that claims to be very useful, but shows no examples on the page. >Expect is a tool for automating interactive applications such as telnet, ftp, passwd, fsck, rlogin, tip, etc. Expect really makes this stuff trivial. How? >Expect can make easy all sorts of tasks that are prohibitively difficult with anything else. You will find that Expect is an absolutely invaluable t…

There are nice examples on wikipedia: http://en.wikipedia.org/wiki/Expect.

Re: Expect – A tool for automating interactive applications

#24

Wow, a blast from the past. I still have some expect tools I wrote long ago that I use and maintain to this day. Not so much new stuff since scripting languages have gotten better at doing what expect does -- often calling their modules "expect" and using the exact same syntax. I once wrote a webserver in Expect. No, it's not a good language for writing a webserver.

Tcl is a perfectly fine language for writing web servers with, actually. It was possible to do a nice, lightweight, evented web server years before Node.js showed up. AOLserver is also done with Tcl, and for a while in the 90ies, was one of the best systems for doing dynamic web sites.

Re: Expect – A tool for automating interactive applications

#25
post #24

Wow, a blast from the past. I still have some expect tools I wrote long ago that I use and maintain to this day. Not so much new stuff since scripting languages have gotten better at doing what expect does -- often calling their modules "expect" and using the exact same syntax. I once wrote a webserver in Expect. No, it's not a good language for writing a webserver.

Tcl is a perfectly fine language for writing web servers with, actually. It was possible to do a nice, lightweight, evented web server years before Node.js showed up. AOLserver is also done with Tcl, and for a while in the 90ies, was one of the best systems for doing dynamic web sites.

My understanding was that AOLserver was the NCSA (pre-Apache httpd) server, with TCL as an extension language, not that AOLserver was written in TCL. Weird.

Re: Expect – A tool for automating interactive applications

#26
post #25
post #24

Earlier quoted context omitted.

Tcl is a perfectly fine language for writing web servers with, actually. It was possible to do a nice, lightweight, evented web server years before Node.js showed up. AOLserver is also done with Tcl, and for a while in the 90ies, was one of the best systems for doing dynamic web sites.

My understanding was that AOLserver was the NCSA (pre-Apache httpd) server, with TCL as an extension language, not that AOLserver was written in TCL. Weird.

Yes, it's a mixture of the two, which makes eminent sense if you consider the speed of computers 20 years ago.

It's Tcl, by the way, not TCL.

Re: Expect – A tool for automating interactive applications

#28

Earlier quoted context omitted.

I used pexpect as a base technology for ShutIt: http://ianmiell.github.io/shutit/ it really is 95% of tcl's expect functionality, much easier to debug and understand. I'm grateful it exists, and it's much under-used I think.

Nice. I have a somewhat similar tool but it doesn't do much besides check for password expiry and do password changes. It uses pexpect but also multiprocessing and multiprocessing.Queue. I built most of it before we started using Ansible at work, but it is still useful in those places where Ansible is clumsy.

Interesting - where is Ansible clumsy?

Re: Expect – A tool for automating interactive applications

#30
post #20

Earlier quoted context omitted.

I used pexpect as a base technology for ShutIt: http://ianmiell.github.io/shutit/ it really is 95% of tcl's expect functionality, much easier to debug and understand. I'm grateful it exists, and it's much under-used I think.

It was great to see ShutIt during the last Docker London!

Thanks! A previous similar talk is the first link here: https://www.youtube.com/user/ianmiell
Post reply on HN