区别:
◆使用Python的os.system运行CMD命令
◆使用Windows自带的命令行工具运行CMD命令
Python下的CMD:
在Python程序中添加以下代码,将当前CMD窗口的编码临时更改为utf-8
import os
os.system('chcp 65001')
区别:
◆使用Python的os.system运行CMD命令
◆使用Windows自带的命令行工具运行CMD命令
Python下的CMD:
在Python程序中添加以下代码,将当前CMD窗口的编码临时更改为utf-8
import os
os.system('chcp 65001')