简体   繁体   English

使用PyCharm运行bash脚本

[英]Run bash script using PyCharm

I have a python project and inside the project, I have a bash script to upload to a server. 我有一个python项目,在项目内部,我有一个bash脚本要上传到服务器。 I usually run this bash script in my terminal using 我通常使用以下命令在终端中运行此bash脚本

./bash_script.sh

I would like to know if it's possible to do this using PyCharm? 我想知道是否可以使用PyCharm做到这一点?

Select View > Tool Windows > Terminal from the main menu in Pycharm to open an embedded terminal. 从Pycharm的主菜单中选择“ View > Tool Windows > Terminal ”以打开嵌入式终端。

You can configure options, like path to the shell you'd like to use and the start directory in Preferences > Tools > Terminal 您可以在Preferences > Tools > Terminal配置选项,例如您要使用的外壳的路径以及开始目录

you can add Bash Run/Debug configuration in PyCharm 您可以在PyCharm中添加Bash运行/调试配置

在此处输入图片说明

Just go to the Edit configuration the Ctrl+Shift+A hotkey and find it by typing Run/Debug, like this 只需按Ctrl + Shift + A热键进入“编辑”配置,然后通过键入“运行/调试”来找到它,就像这样

在此处输入图片说明

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM