import os #导入OS模块 os.system() #执行CMD命令或者批处理脚本
举例说明:
import os os.system('echo aaa') os.system(r'D:\111.bat')