res = os.popen("cmd命令")
tempstream = res._stream
print(tempstream.buffer.read().decode(encoding='utf-8'))
s = tempstream.buffer.read().decode(encoding='utf-8')
之后得到就是字符串了,可以正则取我们的结果
res = os.popen("cmd命令")
tempstream = res._stream
s = tempstream.buffer.read().decode(encoding='utf-8')
之后得到就是字符串了,可以正则取我们的结果
本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。