#! /usr/bin/env python import os if(os.system('ping -c 1 -w 1180.23.212.1')==0): print 'OK' else: print 'Connection failed'
判断主机是否连通,ping一下返回结果
tbtcywtsitw ©著作权
#! /usr/bin/env python import os if(os.system('ping -c 1 -w 1180.23.212.1')==0): print 'OK' else: print 'Connection failed'
判断主机是否连通,ping一下返回结果
下一篇:学习笔记1
本文详细介绍了Java实现管线拓扑关系连通性的方法,并给出了详细的代码示例;同时详细介绍了深度优先搜索(DFS)和广度优先搜索(BFS)的联系与区别。
java检测当前CPU负载状态的方法详解。
目录• 查询电脑ip地址及连接的命令• socket套接字• UDP网络通信• 使用udp发送数据• 使用udp接受数据• 绑定端口• 数据的解析
Python实现判断ip连通性的方法,这些Python实现判断ip连通性的方法在今后Python开发工程师的工作中会经常用到,因此各位小伙伴们快随小编一起来看一下吧。
举报文章
请选择举报类型
补充说明
0/200
上传截图
格式支持JPEG/PNG/JPG,图片不超过1.9M