Question : how to deal with device without term length 0 #2930
Unanswered
pengembaratemporer
asked this question in
Q&A
Replies: 1 comment
-
Yes, you could construct a loop using a regex and a logical or i.e. something like: while True:
pattern=r"More|#"
new_output = net_connect.send_command(command, expect_string=pattern)
output += new_output
if "More" in new_output:
# send a space-bar or whatever is needed to continue through pagination
elif "#" in new_output:
# all done
break |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Sorry if this is repeated question. But searched does not find result.
how to send command if user privileges is not allowed for terminal length 0 command ?
basically it should expect for :
i read about “expect_string”, if not mistaken. We can say expect for “—More—“, But the problem is the output sometimes dont need for more.
Obvious solution is leverage the privilege so this user can allowed to send term le 0, but unfortunately, it is not possible at the moment.
thanks.
Beta Was this translation helpful? Give feedback.
All reactions