发布网友 发布时间:2024-10-23 17:57
共2个回答
热心网友 时间:1分钟前
>>> import os
>>> os.system('ping -c 3 10.34.40.22')
PING 10.34.40.22 (10.34.40.22) 56(84) bytes of data.
bytes from 10.34.40.22: icmp_seq=1 ttl= time=0.501 ms
bytes from 10.34.40.22: icmp_seq=2 ttl= time=0.2 ms
bytes from 10.34.40.22: icmp_seq=3 ttl= time=0.277 ms
--- 10.34.40.22 ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 1998ms
rtt min/avg/max/mdev = 0.277/0.355/0.501/0.105 ms
0
非常简单的,哈哈
热心网友 时间:2分钟前
for i in range(3):
os.system("ping ping 192.168.1.1")