P
Phoe6
I have been trying to use pexpect and I am failing with
pexpect.TIMEOUT for all my attempts. In order to troubleshoot, I
decided to go with simplest possible one.
Here is my ssh to localhost:
[21:29:14 senthil]$ssh localhost -l senthil
senthil@localhost's password:
senthil@ubuntu:~$
And here is my pexpect script:
http://paste.pocoo.org/show/121788/
And the output I get is:
True
None
None
Traceback (most recent call last):
File "4.py", line 17, in <module>
print child.read()
File "/usr/local/lib/python2.6/site-packages/pexpect.py", line 858,
in read
self.expect (self.delimiter) # delimiter default is EOF
File "/usr/local/lib/python2.6/site-packages/pexpect.py", line 1311,
in expect
return self.expect_list(compiled_pattern_list, timeout,
searchwindowsize)
File "/usr/local/lib/python2.6/site-packages/pexpect.py", line 1325,
in expect_list
return self.expect_loop(searcher_re(pattern_list), timeout,
searchwindowsize)
File "/usr/local/lib/python2.6/site-packages/pexpect.py", line 1409,
in expect_loop
raise TIMEOUT (str(e) + '\n' + str(self))
pexpect.TIMEOUT: Timeout exceeded in read_nonblocking().
Complete Traceback is here:
http://paste.pocoo.org/show/121790/
Can someone help me what I am doing wrong here?
Why is not working for such a simple thing as ssh to my localhost.?
I am getting the same problem while trying to login to remote host
also.
Thanks,
Senthil
pexpect.TIMEOUT for all my attempts. In order to troubleshoot, I
decided to go with simplest possible one.
Here is my ssh to localhost:
[21:29:14 senthil]$ssh localhost -l senthil
senthil@localhost's password:
senthil@ubuntu:~$
And here is my pexpect script:
http://paste.pocoo.org/show/121788/
And the output I get is:
True
None
None
Traceback (most recent call last):
File "4.py", line 17, in <module>
print child.read()
File "/usr/local/lib/python2.6/site-packages/pexpect.py", line 858,
in read
self.expect (self.delimiter) # delimiter default is EOF
File "/usr/local/lib/python2.6/site-packages/pexpect.py", line 1311,
in expect
return self.expect_list(compiled_pattern_list, timeout,
searchwindowsize)
File "/usr/local/lib/python2.6/site-packages/pexpect.py", line 1325,
in expect_list
return self.expect_loop(searcher_re(pattern_list), timeout,
searchwindowsize)
File "/usr/local/lib/python2.6/site-packages/pexpect.py", line 1409,
in expect_loop
raise TIMEOUT (str(e) + '\n' + str(self))
pexpect.TIMEOUT: Timeout exceeded in read_nonblocking().
Complete Traceback is here:
http://paste.pocoo.org/show/121790/
Can someone help me what I am doing wrong here?
Why is not working for such a simple thing as ssh to my localhost.?
I am getting the same problem while trying to login to remote host
also.
Thanks,
Senthil