Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can´t stop a loop for a show command #61

Open
Robjul opened this issue May 28, 2019 · 0 comments
Open

Can´t stop a loop for a show command #61

Robjul opened this issue May 28, 2019 · 0 comments

Comments

@Robjul
Copy link

Robjul commented May 28, 2019

Hi everyone

I´m new here so I´ll apreciate all your support (note: sorry for my weak english)

So I have a problem wht my code I try to do a cycle whit a "show" command, this is my code:

show = net_connect.send_command_timing("show sbc adjacency ", strip_prompt=False)

while True:
if "--More--" in show:
show += net_connect.send_command.timing("\n", strip_prompt=false)
print(show)

The reason to do this it's because the command "show sbc adjacency" display a lot of info and I need to press "enter" to display all of them.

So I need to stop the loop, I tried to this code but it doesnt work:

while True:
if "--More--" in show:
show *= net_connect.send_command.timing("\n", strip_prompt=false)
print(show)
break
return show

Could you please tell me a possible solution.

Thanks!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant