PyCharm-如何创建一个运行/调试配置来执行一个使用Python脚本作为参数的.bat文件?

时间:2018-09-04 23:46:31

标签: python pycharm jetbrains-ide monkeyrunner monkey

我想创建一个新的运行/调试配置,该配置将执行一个接受Python脚本作为参数的let test:Int32 = -1 let leftOrRight:CGFloat = pow(CGFloat(test),random(min:0,max:1)) func random(min : CGFloat, max : CGFloat) -> CGFloat{ return random() * (max - min) + min } 文件。

我要执行的程序是.bat文件夹中的MonkeyRunner(Android SDK的工具部分)。我的PyCharm项目位于C:\Users\talha\AppData\Local\Android\Sdk\tools\bin文件夹中。

2 个答案:

答案 0 :(得分:0)

代替在Explorer中手动导航-只需在此类bat文件上使用“导航|在...中选择| Explorer(Alt + F1,8)”,IDE便会打开已选择该文件的Explorer。 https://intellij-support.jetbrains.com/hc/en-us/community/posts/207057025-Can-I-run-a-batch-file-bat-from-within-the-IDE-

答案 1 :(得分:0)

有一个 free plugin on the JetBrains marketplace 提供:

<块引用>

Windows 批处理脚本支持 IntelliJ IDEA。支持语法 突出显示,运行可以运行任何命令的配置,也可以为空 配置。当您需要时,空运行配置很有用 通过运行配置执行外部工具。