Live data from Hacker News

Expect – A tool for automating interactive applications

expect.sourceforge.net

51–52 of 52 posts

Re: Expect – A tool for automating interactive applications

#51
post #7

Be sure to check out "autoexpect": it starts an interactive session, and generates an expect script based on that. Then you typically need to edit it for generalization (e.g., skip dates and time strings; often skip version strings, etc.).

How did I not know about this? Autoexpect is one of the thousand ways of interacting with computers that we USED to do back in the 80s and 90s that have since fallen out of favor. Macros, modem dialers, folder watchers, etc.. Remember trying the record button in Applecript Editor, only to find that it didn't actually work like it did in Macro Maker? The fact that autoexpect isn't installed by default on Mac OS blows…

Autoexpect comes bundled with Expect (it is an Expect script itself). Try

  brew install expect

Re: Expect – A tool for automating interactive applications

#52

Earlier quoted context omitted.

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?

(just noticed this)

I was just sort of echoing your

    annoyed by the obfuscation and indirection of ...
Ansible's prime raison d'être is not remote execution but configuration management.
Post reply on HN