Expect on window (from python script)
eddie at holyrood.ed.ac.uk
Mon Mar 3 19:29:20 CET 2003
claird at lairds.com (Cameron Laird) writes:
>You wrote me that
> child = pexpect.spawn('telnet xp-1')
> exp = child.expect('login: ')
> # till here all o.k
> # Here start the problem :
> # the expect got only the first
> # cur from the word "tester"
> # instead of sending the whole
> # word and wait for the xp-1:password: line.
It occurs to me to wonder if sendlines behaviour of adding just linefeed is
enough and maybe sending 'tester\n' might work. I think a telnet client is
supposed to handle this transparently but it might be worth a try.
More information about the Python-list