原文:python中的commands模块,执行出错:'{' 不是内部或外部命令,也不是可运行的程序 或批处理文件。

最近发现了python的commands模块,查看了下源码,使用的popen封装的,形成三个函数getstatus , getoutput , getstatusoutput 源码如下: def getstatus file : Return output of ls ld lt file gt in a string. import warnings warnings.warn commands ...

2015-01-14 10:50 1 5170 推荐指数:

查看详情

 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM