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

 

相关文章:

  • 2022-02-10
  • 2021-07-04
  • 2021-08-11
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-11-01
  • 2022-12-23
  • 2021-08-22
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-12-11
相关资源
相似解决方案