在 PyCharm 中运行结束时启动脚本 [英] Launch script at the end of the run in PyCharm

查看:25
本文介绍了在 PyCharm 中运行结束时启动脚本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

对于特定情况,我需要所有 PyCharm 项目在每次运行结束时运行给定的脚本.

For a specific case, I need all PyCharm projects to run a given script at the end of each run.

在运行/调试配置中,有一个选项可以在启动前运行脚本.是否有类似的选项可以在运行结束后运行脚本?

In the Run/Debug configurations, there is an option to run a script before launch. Is there a similar option to run a script once the run is over?

如果它不存在(正如我所怀疑的那样),我可以使用其他技巧吗,也许使用 zsh 别名或其他东西?

If it does not exist (as I suspect), is there another trick I could use, maybe with a zsh alias or something?

推荐答案

可以使用插件Multirun 在任何 JetBrains IDE 上运行.使用它只需为您的主脚本创建一个配置,为最终脚本创建另一个配置.之后,只需创建一个调用两个脚本的 Multirun 配置.

You can use the plugin Multirun on any JetBrains IDE. Using that just create a configuration for your main script and another one for the end-script. After that just create a Multirun configuration that calls both of your scripts.

这篇关于在 PyCharm 中运行结束时启动脚本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆