1 Star 0 Fork 1

thinking01 / py_notify_linkong

forked from bobshi / py_notify_linkong 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
util.py 500 Bytes
一键复制 编辑 原始数据 按行查看 历史
bobshi 提交于 2013-09-05 22:52 . init commit,which works fine at linux
'''
Created on 2013-7-1
@author: Administrator
'''
def cmd(cmd):
import subprocess;
tmp = subprocess.Popen(cmd,shell=True,stdout=subprocess.PIPE,stderr=subprocess.PIPE)
rtn = {}
rtn['error'] = tmp.stderr.readlines()
rtn['out'] = tmp.stdout.readlines()
return rtn;
def cmd2(cmd):
import subprocess;
rtn = subprocess.Popen(cmd,shell=True,stdout=subprocess.PIPE,stderr=subprocess.PIPE)
# print tmp.stdout.readlines()
# print tmp.stderr.readlines()
return rtn
1
https://gitee.com/thinking01/py_notify_linkong.git
git@gitee.com:thinking01/py_notify_linkong.git
thinking01
py_notify_linkong
py_notify_linkong
master

搜索帮助