模块pexpect截断输出

时间:2015-08-26 13:38:53

标签: python pexpect

我有简单的代码

try:
    t = list()
    cursor.maxread = 1
    cursor.timeout = 15
    cursor.sendline('show lldp remote_ports')
    for line in cursor:
        t.append(line)
except Exception:
    cursor.delaybeforesend = 0.5
    cursor.maxread = 2000
    cursor.timeout = 180

但是在输出中并不是我需要的所有文本,它被截断(大约32 kb) 我怎么能得到所有文字?它大约是50 kb

不是一个非常好的解决方案,但它有效:

{{1}}

0 个答案:

没有答案
相关问题