import subprocess file_out = subprocess.Popen('ping www.baidu.com', shell=True, stdout=subprocess.PIPE, stderr=subprocess.STDOUT) while True: line = file_out.stdout.readline() print(line) if subprocess.Popen.poll(file_out)==0: break
import subprocess file_out = subprocess.Popen('ping www.baidu.com', shell=True, stdout=subprocess.PIPE, stderr=subprocess.STDOUT) while True: line = file_out.stdout.readline() print(line) if subprocess.Popen.poll(file_out)==0: break
本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。