[Tutor] responding to command line

Patrick Hess patrickhess at gmx.net
Wed Nov 25 10:35:16 EST 2015


Alan Gauld wrote:
> But there is a python wrapoper round expect - pexpect - that
> means you don't need to learn Tcl ;)
> 
> https://github.com/pexpect/pexpect
 
Interesting, thanks. And better yet, it's not just a wrapper
around Expect: "Pexpect is in the spirit of Don Libes' Expect,
but Pexpect is pure Python." So you don't even have to install
anything Tcl. :-)

On the downside, Windows support seems to be quite limited at
this point. However, if that's not of any concern to Richard,
Pexpect is probably his best option. This example right here
looks like a good starting point:

   https://github.com/pexpect/pexpect/blob/master/examples/passmass.py

I, unfortunately, have to deal with Windows from time to time,
so it's still Tcl for me...

Patrick


More information about the Tutor mailing list