I dont know how to describe it, just nothing happens in a while and then suddenly I get this. Im new with this module and I really dont know why I get this error: pexpect.TIMEOUT: Timeout exceeded in read_nonblocking()
.
My code:
import pexpect
child = pexpect.spawn('scp abc user@ip:')
child.expect('Password .*:')
child.sendline('pwd')
What happens when you try:
child.expect('Password .*:', timeout=None)