Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Expect – Writing a Tcl Extension in Only Seven Years (1997) (nist.gov)
23 points by michaelsbradley on Jan 29, 2015 | hide | past | favorite | 9 comments


is expect still the default tool for command line automation, or has it been superseded by something else?


I haven't seen anything else in use anywhere. I believe it's still pretty much the undisputed king.


Perl has the work-alike Expect module.



…and Ruby has the PTY module which includes an `expect` method, which is in the same ballpark:

http://ruby-doc.org/stdlib-2.2.0/libdoc/pty/rdoc/PTY.html


I have found that simply opening sockets , pipes or serial ports and "fconfigure -translation binary -blocking 0 -buffering none" and using event driven I/O in regular Tcl to be superior. You use this same pattern for all activity, which makes things more consistent.


What's next for Tcl? I'm a fan.


There's the Caius framework:

http://caiusproject.com/

I haven't spent any hands-on time with it yet, but what I've read so far is what led me to start learning more about expect, and Tcl in general. I'm looking for a robust way to test the systems I'm building with docker: machine, compose (fig), swarm, etc.


Neat. I wrote TCL like 10 years ago daily, mostly for different shell scripts and Eggdrop extensions. That was fun…




Consider applying for YC's Winter 2027 batch! Applications are open till November 2.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: