python run configuration_How can I run a shell script instead of python in a PyCharm run configurati...

If you want to see such a feature in PyCharm please vote on IDEA-112256

'Command Line' Run Configuration feature request.

Run/Debug Configurations section of Pycharm's online help lists all supported types of Run/Debug configurations and there's no support for shell scripts indeed.

However, you might be able to add such support by installing a plugin. For example, if you are interested in bash scripts there's BashSupport plugin which adds support for running shell scripts in Run/Debug configuration.

From plugins' home page:

BashSupports can directly run scripts within IntelliJ. You can create

a new run configuration for Bash scripts. Here you can set which

interpreter is used to run it. Whenever a script is executed the

output is logged. If Bash prints out syntax errors then the errorneous

lines are clickable to jump to the location of the error.

For Windows there's CmdSupport plugin which provides an action to run .cmd scripts. It seems it does not support running such scripts as Run/Debug configuration however.

As a workaround you can use Python run/debug configuration, specifying some dummy (empty) Python file to run and use Before launch option specifying External tool and specify path to the script when adding/configuring this external tool. See In IntelliJ IDEA, how can I create a key binding that executes a shell script with the current file as a parameter? for details.

As PyCharm is based on IntelliJ's IDEA platform the question IntelliJ IDEA: Running a shell script as a Run/Debug Configuration is very related.

Speaking of run/debug configurations you might be interested in the plugin Run Configuration as Action which

(...) provides a way to use run configurations as buttons on toolbar.

Or assign shortcuts to execute specific run configuration.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值