[英]PyCharm - How to create a Run/Debug Configuration that executes a .bat file which uses a Python script as a parameter?
I want to create a new Run/Debug Configuration which executes a .bat
file that accepts a Python script as a parameter.我想创建一个新的运行/调试配置,它执行一个接受 Python 脚本作为参数的
.bat
文件。
The program I want to execute is MonkeyRunner
(a tool part of Android SDK) which is located in the C:\\Users\\talha\\AppData\\Local\\Android\\Sdk\\tools\\bin
folder.我要执行的程序是
MonkeyRunner
(Android SDK 的一个工具部分),它位于C:\\Users\\talha\\AppData\\Local\\Android\\Sdk\\tools\\bin
文件夹中。 And my PyCharm project is located in C:\\Users\\talha\\Documents\\PyCharmProjects
folder.我的 PyCharm 项目位于
C:\\Users\\talha\\Documents\\PyCharmProjects
文件夹中。
而不是在资源管理器中手动导航——只需在此类 bat 文件上使用“导航 | 选择... | 资源管理器 (Alt+F1, 8)”,IDE 将打开资源管理器,该文件已选择https://intellij-support。 jetbrains.com/hc/en-us/community/posts/207057025-Can-I-run-a-batch-file-bat-from-within-the-IDE-
There's a free plugin on the JetBrains marketplace that provides: JetBrains 市场上有一个 免费插件,它提供:
Windows Batch Scripts support for IntelliJ IDEA.
Windows 批处理脚本支持 IntelliJ IDEA。 Supports syntax highlighting, run configurations that can run any command, also empty configurations.
支持语法高亮,可以运行任何命令的运行配置,也支持空配置。 Empty run configurations are useful when you want to execute an external tool through a run configuration.
当您想通过运行配置执行外部工具时,空运行配置很有用。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.