I really like this module but im running into an issue getting the "expect" function to work correctly.
It seems as though its not reading the data form the buffer. Im no Python Wiz so im not totally sure
what the issue is but i can supply the error.
The code Logs in to the router just fine and the prompt i will get back is "FW80CM3911602851 #"
in my out put i do get "FW80CM3911602851 #" displayed back to the console but expect never
matches the out put.
im just matching this exactly just to make sure its matching correctly .. The issue is it dose not seem to be working .
Below is my testing code:
!/usr/bin/python2
import paramiko
from paramikoe import SSHClientInteraction
import traceback
Traceback (most recent call last):
File "/home/todd/PycharmProjects/paramikoe-test/Main.py", line 24, in Main
if interact.expect(re_strings='.FW80CM3911602851 # ', timeout=60):
File "/usr/local/lib/python2.7/dist-packages/paramikoe.py", line 122, in expect
buffer = self.channel.recv(self.buffer_size)
File "/usr/lib/python2.7/dist-packages/paramiko/channel.py", line 619, in recv
raise socket.timeout()
timeout
I really like this module but im running into an issue getting the "expect" function to work correctly. It seems as though its not reading the data form the buffer. Im no Python Wiz so im not totally sure what the issue is but i can supply the error.
The code Logs in to the router just fine and the prompt i will get back is "FW80CM3911602851 #" in my out put i do get "FW80CM3911602851 #" displayed back to the console but expect never matches the out put.
im just matching this exactly just to make sure its matching correctly .. The issue is it dose not seem to be working .
Below is my testing code:
!/usr/bin/python2
import paramiko from paramikoe import SSHClientInteraction import traceback
def Main():
if name == "main": Main() author = 'todd'
Out put =
/usr/bin/python2.7 /home/todd/PycharmProjects/paramikoe-test/Main.py FW80CM3911602851 #
Traceback (most recent call last): File "/home/todd/PycharmProjects/paramikoe-test/Main.py", line 24, in Main if interact.expect(re_strings='.FW80CM3911602851 # ', timeout=60): File "/usr/local/lib/python2.7/dist-packages/paramikoe.py", line 122, in expect buffer = self.channel.recv(self.buffer_size) File "/usr/lib/python2.7/dist-packages/paramiko/channel.py", line 619, in recv raise socket.timeout() timeout
Process finished with exit code 0