私が何をしているのかを説明するのは難しいですが、要するに、私が提供している長い入力文字列のために pexpect のログ/出力が台無しになっています... 小さな (物理)ウィンドウサイズ
例えば、
! Using Python
# Python2.6
# Windows 7, Cygwin
# Psuedo-Code - I am giving this
p = pexpect.spawn('ssh Router')
p.sendline('show logging | include MLSCEF-DFC1-2-FIB_TCAM_WRITE_INCONSISTENCY')
i = p.expect('Router#')
print p.before
# Output Seen as
Router# show logging | include MLSCEF-DFC1-2-FIB_TCAM_WRITE$g | include MLSCEF-DFC1-2-FIB_TCAM_WRITE_ INCONSISTe MLSCEF-DFC1-2-FIB_TCAM_WRITE_INCONSISTE NCY
! Using Putty
# This is seen from a tiny putty session for Router
# Really I am just Copy Pasting the line "show logging | include MLSCEF-DFC1-2-FIB_TCAM_WRITE_INCONSISTENCY" into Putty and finally, putty looks like this
ur01.steubenville.oh.pitt#$EF-DFC1-2-FIB_TCAM_WRITE_INCONSISTENCY
# If I increase the windows size of the putty, I see the whole output
ur01.steubenville.oh.pitt#show logging | include MLSCEF-DFC1-2-FIB_TCAM_WRITE_INCONSISTENCY
説明する別の方法は、これは pexpect でも起こっていることです - http://support.suso.com/supki/File:Nano-pasted-authorizedkeys.png
最終的に、ドル記号 ($) が見えないように、pexpect で入力ウィンドウのサイズを大きくしたいですか?