如何通过批处理文件直接运行python代码

如何通过批处理文件直接运行python代码

run.bat文件

@Rem 跳转至当前目录
@cd /d "%~dp0"  

@Rem 运行python代码
@python.exe test.py  

@Rem 保存窗口5秒
@ping 127.0.0.1 -n 5 >nul  

参考文献

bat命令详解

posted @ 2019-08-19 11:52  bitbitbyte  阅读(384)  评论(0编辑  收藏  举报