擅长:python、mysql、java
<p>这对我来说是完美的:</p>
<pre><code>def cmd = 'python -c "print(\'hello\')"'
def proc = cmd.execute()
proc.waitFor()
println "return code: ${ proc.exitValue()}"
println "stderr: ${proc.err.text}"
println "stdout: ${proc.in.text}"
</code></pre>
<p>使用“Execute Groovy script”(而不是“Execute system Groovy script”)</p>