David Anderson <li...@pern.co.uk> writes: > I am trying to automate the following session - to talk to my router: > > telnet speedtouch [...] > I am using the following code: [...] > child.expect('sername : ') > child.sendline('Administrator')
I've scripted communications with my Speedtouch 510 using pexpect: I use it to send the router's logs to my server. The obvious difference between my script and yours is that instead of sendline, I used send and an explicit carriage return. kid.expect('Username :') kid.send('admin\r\n') I think this is a result of a similar problem, but I don't remember any more. Anyway, I've put my (very simple) script up at http://www.distorted.org.uk/~mdw/example/guvnor-maintenance in case you're interested. (No, I wasn't daft enough to put the password in the script!) -- [mdw] -- http://mail.python.org/mailman/listinfo/python-list