res = os.popen("cmd命令")
tempstream = res._stream

s = tempstream.buffer.read().decode(encoding='utf-8')
之后得到就是字符串了,可以正则取我们的结果

相关文章: