擅长:python、mysql、java
<p>假设它是一个bash脚本,从中调用python函数,应该按如下方式执行:</p>
<pre><code>function callPython()
{
local pythonResult=<code for calling python>
echo $pythonResult
}
local pythonReturnOutput = $(callPython)
</code></pre>
<p>现在可以使用pythonReturnOutput。在</p>
<p>如果不使用bash,shell脚本,这个答案可能不正确。但是,我强烈建议您准备好一个脚本,如果还没有的话。在</p>