Skip to content Skip to sidebar Skip to footer

Pexpect And Sending An "Enter Key" Issues

I am using pexpect with python 2.7. I am currently writing a script to login to a jump server and then subsequently login to some cisco devices to perform some operations in an aut

Solution 1:

.sendline() is equivalent to .sendline('') that is equivalent to .send('') + .send(self.linesep) that is likely has the same effect as .send('\n') ('\n' == '\012', '\r' == '\015'). You could also try .send('\r\n') (I'm not sure who is responsible for the terminal line discipline).


Solution 2:


Post a Comment for "Pexpect And Sending An "Enter Key" Issues"