终端中没有输出来自Python的bash脚本

时间:2018-03-06 21:51:14

标签: python linux bash python-3.x python-3.5

我试图运行一个bash脚本,它在Python脚本的终端窗口中为我运行更新和升级,使用:

import subprocess

subprocess.call(['bash', '/home/pi/updatescript.sh'])

当我运行python脚本时,我看到终端窗口中没有输出,就像我从那里使用./运行脚本一样。这是正常的吗?或者我做错了什么?

我尝试了一些其他使用xdotool的脚本,但它们似乎没有像终端那样运行,所以我有点困惑。

0 个答案:

没有答案
相关问题