么,不了解的可以百度一下
直接上简单的代码做铺垫:
ort os n = 1 print('欢迎使用Ping工具(基于Windows CMD)') while True: choose = input('死亡之Ping请按1,正常Ping请按2:') if choose == str(1): while True: print("按 Ctrl + C 停止") ip = input('请输入要Ping的IP或Domain:') os.system('ping -l 65500 %s -t' % ip) print(' ') elif choose == str(2): while True: print("第%s次Ping" % n) ip = input('请输入要Ping的IP或Domain:') os.system('ping %s' % ip) n = n + 1 print(' ') else: pass
还没有评论,来说两句吧...