摘要:
最近发现了python的commands模块,查看了下源码,使用的popen封装的,形成三个函数getstatus(), getoutput(), getstatusoutput()源码如下:def getstatus(file): """Return output of "ls -ld " ... 阅读全文
posted @ 2015-01-14 10:50
熠然
阅读(6769)
评论(1)
推荐(0)
摘要:
commands模块用于调用shell命令有3中方法:commands.getstatus() 返回执行状态commands.getoutput() 返回执行结果commands.getstatusoutput() 返回一个元组,执行状态和执行结果其他执行shell命令的方法还有:1.os.sy... 阅读全文
posted @ 2015-01-14 09:24
熠然
阅读(4107)
评论(0)
推荐(0)

浙公网安备 33010602011771号