一、创建python测试文件 1.py,输出 批处理程序调用python程序
print("批处理程序调用python程序")
二、创建批处理程序2.bat,计算1-100的累计和
@echo off for /l %%i in (1,1,100) do ( set /a sum+=%%i ) echo %sum% pause
三、创建批处理程序 调用.bat
python D:UsersDELLDesktop1.py D:UsersDELLDesktop2.bat pause
四、程序执行结果