import os
mystr = os.popen("ipconfig")
mystr = mystr.read()
print(mystr)
input()
python执行cmd命令正常返回字符串赋值给mystr
mystr输出字符串正常
python版本 3.7.p 并安装you-get
cmd命令:you-get -i https://www.bilibili.com/bangumi/play/ep453582?from_spmid=666.25.episode.0%E6%89%A7%E8%A1%8C%E6%AD%A3%E5%B8%B8
import os
mystr = os.popen("you-get")
mystr = mystr.read()
print(mystr)
input()
python执行cmd命令正常返回字符串赋值给mystr
mystr输出字符串正常
import os
mystr = os.popen("you-get -i https://www.bilibili.com/bangumi/play/ep453582?from_spmid=666.25.episode.0")
mystr = mystr.read()
print(mystr)
input()
mystr无法获取并打印字符串并且报错