首页 > 解决方案 > 使用“超时”批处理命令运行带有 args 的 python

问题描述

为了从 cmd 文件运行 python,我只需要运行:

python file_name.py

为了添加超时,正如这里建议的那样,我们应该只做这样的事情:

timeout time_in_secs python file_name.py

但是如何运行带有 args 的 python 之类的东西呢?

timeout time_in_secs python file_name.py --cli_arg="cli_arg"

标签: python-3.xbatch-filecmdtimeout

解决方案


推荐阅读