Hi Team,
Below is my code, i am frequently hitting timeout issue to login to linux or 
router.
import pexpectfrom pexpect import *child = spawn('su xxxxx',timeout = 
50)child.expect('Password:',timeout = 
50)child.sendline('XXXXXXX')#child.sendline('ls -l')#chasis = 
child.before.decode('utf-8')child.expect('krishna@krishna-desktop:~/python_excercises$',timeout
 = 50)child.sendline('ls -l')chasis = child.before.decode('utf-8')print(chasis)
Error :
    raise TIMEOUT(msg)pexpect.exceptions.TIMEOUT: Timeout 
exceeded.<pexpect.pty_spawn.spawn object at 0x7f068506fa20>

Please guide me.
Krishna.

_______________________________________________
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor

Reply via email to