Hey, I'm trying to execute a command over a remore server using pexpect +++++++++++++++++ url = 'ssh internalserver' res = pexpect.spawn(url) print '1' res.expect('.*ssword:') print '2' res.sendline('mypasswd') print '3' res.sendline('ls -aslh') +++++++++++++++++ What I want to do is to send a couple of commands and get the response. How to do this? Thanks. -- http://mail.python.org/mailman/listinfo/python-list
- A little help with pexpect Hussein B
- Re: A little help with pexpect Piet van Oostrum
- Re: A little help with pexpect Piet van Oostrum