Live data from Hacker News

Expect – A tool for automating interactive applications

expect.sourceforge.net

11–20 of 52 posts

Re: Expect – A tool for automating interactive applications

#12
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.

Re: Expect – A tool for automating interactive applications

#13
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 tool - using it, you will be able to automate tasks that you've never even thought of before - and you'll be able to do this automation quickly and easily.

HOW?

Ah, examples... >http://expect.sourceforge.net/#examples

It's just a giant README. This is frustrating.

Re: Expect – A tool for automating interactive applications

#16
post #14

For python, there's pexpect: http://pexpect.readthedocs.org/en/latest/

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.

Re: Expect – A tool for automating interactive applications

#19
post #14

For python, there's pexpect: http://pexpect.readthedocs.org/en/latest/

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.

Re: Expect – A tool for automating interactive applications

#20
post #14

For python, there's pexpect: http://pexpect.readthedocs.org/en/latest/

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!
Post reply on HN