Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如果我跑了
from plumbum import local local['ping']['google.com']()
它会无限期地挂起,因为 ping 永远执行。
有没有办法在执行时打印 ping 的输出,可能在生成器或其他东西中,比如
for a in local['ping']['google.com'](): print a
根据文档,这应该有效:
from plumbum import local, FG local["ping"]["google.com"] & FG