telnetlib を使用して、最後のコマンドをサーバーに書き込んだ後に出力を出力しています
tn.write(cmd_login)
tn.write(cmd...)
tn.write(cmd_last)
print tn.expect([word],timeout)[-1]
ただし、 return of expected を出力すると、前にサーバーに書き込んだ結果も表示されます(例:cmd_login cmd ...) tn.write(cmd_last) の後にのみ結果を出力する方法はありますか?