如何继续使用“更多"一词?到达命令的末尾 [英] How to proceed with the word "MORE" to get to the end of the command

查看:56
本文介绍了如何继续使用“更多"一词?到达命令的末尾的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在真实设备上,当我想访问show gpon onu state"时,需要按几下空格键才能到达行尾.对于 paramiko 如何消除更多"这个词,以便您到达行尾?

On a real device when I want to access "show gpon onu state" it takes a few presses of the space bar to get to the end of the line. for paramiko how to eliminate the word "more" so that you get to the end of the line?

推荐答案

此案例有多种解决方案:

There are several solution type for this case:

  1. 每个品牌都有针对此问题的屏幕长度命令.可以先输入这个命令.

  1. Each brand has a screen-length command for this issue. You can enter this command first.

  • Cisco:终端长度 0
  • 华为 : screen-length 0 临时
  • 诺基亚/阿尔卡特:环境不再
cmd.send("terminal length 0" + '\r')
time.sleep(1)

  • 您可以在实际命令之后发送 spaceenter 命令.空格命令给你几行,回车命令给你多一行.

  • You can send the space or enter command after your actual command. Space command gives you several lines, enter command gives you one line more.

    cmd.send("display interface description" + '\r')
    time.sleep(1)
    cmd.send(" " + '\r')
    time.sleep(1)
    cmd.send(100 * '\r')
    time.sleep(1)
    

  • 这篇关于如何继续使用“更多"一词?到达命令的末尾的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

    查看全文
    登录 关闭
    扫码关注1秒登录
    发送“验证码”获取 | 15天全站免登陆