>>>>> sinan nalkaya <[EMAIL PROTECTED]> writes:

> child.expect(['Password:','Password: ',pexpect.EOF,pexpect.TIMEOUT])
>                 if i == 0:      child.sendline(passwd)
>                 elif i == 1:    print 1
>                 elif i == 2:    print 2
>                 elif i == 3:    print 3

You don't need the second pattern, the first pattern will catch the second
case also. You also need to break when i == 2 or i == 3. 

Ganesan

-- 
Ganesan Rajagopal

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to