发上等愿,结中等缘,享下等福;择高处立,寻平处住,向宽处行

Brick walls are there for a reason :they let us prove how badly we want things

代码改变世界

随笔档案-2015年02月

python commands包不支持windows环境与如何在windows下使用的简易方法

2015-02-13 16:45 by kowme, 1726 阅读, 收藏, 编辑
摘要: commands模块不支持windows环境,让我们来看看。 查看commands.getoutput的源代码: 这个函数调用的是commands.getstatusoutput()函数,那查看下commands.getstatusoutput的源代码 从commands.getstatusoutp 阅读全文

python 批量ping脚本不能用os.system

2015-02-13 16:01 by kowme, 1258 阅读, 收藏, 编辑
摘要: os.system(cmd)通过执行命令会得到返回值。 ping通的情况下返回值为0。 ping不通的情况: 1、请求超时,返回值1 2、无法访问目标主机,返回值为 0,和ping通返回值相同 所以建议不用os.system 阅读全文

It's not who you are underneath, it's what you do that defines you

Brick walls are there for a reason :they let us prove how badly we want things

点击右上角即可分享
微信分享提示