标签:pipe bsp cert line trace python nbsp roc import
#coding=utf-8
import re
import subprocess
def tracertIP(ip):
p = subprocess.Popen([‘tracert‘,ip],stdout=subprocess.PIPE)
while True:
line = p.stdout.readline()
if not line:
break
print line
tracertIP(‘192.168.2.1‘)
标签:pipe bsp cert line trace python nbsp roc import
原文地址:http://www.cnblogs.com/monsteryang/p/6569293.html