【发布时间】:2023-01-03 15:12:47
【问题描述】:
我有这个代码
def ping_google(command):
with open('google.txt', 'a') as f:
f.write(subprocess.check_output(command))
t1 = threading.Thread(target=ping_anel, args=("ping -t 8.8.8.8",))
我想将对 google 的无限 ping 保存在一个 txt 文件中。可能吗?
【问题讨论】: