[Tutor] responding to command line

Alan Gauld alan.gauld at btinternet.com
Wed Nov 25 05:11:37 EST 2015


On 25/11/15 08:27, Patrick Hess wrote:
> richard kappler wrote:
>> and I want the script to detect that password request and provide the
>> password (Same for all 500 + machines, so no issue there).
> 
> My recommendation would be to take a look at Expect[1].
> 
> Yes, I know, it's not Python, but using a tool specifically
> tailored to handle this kind of task will make life so much
> easier that it even justifies the use of Tcl. ;-)

But there is a python wrapoper round expect - pexpect - that
means you don't need to learn Tcl :-)

https://github.com/pexpect/pexpect

-- 
Alan G
Author of the Learn to Program web site
http://www.alan-g.me.uk/
http://www.amazon.com/author/alan_gauld
Follow my photo-blog on Flickr at:
http://www.flickr.com/photos/alangauldphotos




More information about the Tutor mailing list