我有一个python脚本,如下所示。基本上我想禁用我的命令(shell.run)的输出,因为我无法执行连续的代码。
import spur
shell = spur.SshShell(hostname=i, username="mo", password="so")
change = shell.run(["sh", "-c","cd /home/monitor/Emirates-Live/; ./reststart.sh"])
code continued.....
答案 0 :(得分:0)
似乎我需要使用shell.spawn而不是shell.run。请找到以下代码
change = shell.spawn(["sh", "-c","cd /home/monitor/Emirates-Live/; ./restart.sh"])