结构/调用,遵循过程标准输出

问题描述 投票:0回答:0

我正在尝试通过 fabric 运行“tail -f something”,跟踪它的输出直到它完成并在每一行上做一些处理。

从文档看来我需要将

watchers=[my_watcher]
传递给
run
并传递一个子类
StreamWatcher

...但我不确定该怎么做。或者有更简单的方法吗?

python paramiko fabric
© www.soinside.com 2019 - 2024. All rights reserved.