#!/usr/bin/python
import telnetlib
host = '???'
port = '???'
t = telnetlib.Telnet(host,port)
t.read_until('')
t.write('flush_all\r\n')
t.read_until('')
t.write('quit\r\n')
print t.read_all()
转载于:https://blog.51cto.com/yangshi/1168617
转载于:https://blog.51cto.com/yangshi/1168617