python执行cmd命令并且或者返回值
import subprocess
return_code = subprocess.Popen("\"ping baidu.com\"",stdout = subprocess.PIPE,shell=False)
print(return_code.stdout.read())
import subprocess
return_code = subprocess.Popen("\"ping baidu.com\"",stdout = subprocess.PIPE,shell=False)
print(return_code.stdout.read())
本文标题:python执行cmd命令并且或者返回值
本文链接:https://www.haomeiwen.com/subject/qnqrpftx.html
网友评论