os.popen的问题,求助下
python 2.5.4,系统式centos 5.1_x86641、运行一个python:/usr/local/python/bin/python /jykj/transport/transport.py
执行系统命令,结果
[root@localhost ~]# ps -ef|grep python|grep transport.py
root 15200 15124 2 11:32 pts/1 00:00:00 /usr/local/python/bin/python /jykj/transport/transport.py
[root@localhost ~]#
运行python使用popen结果
>>> import os
>>> aaa = "ps -ef|grep python|grep transport.py"
>>> bbb = os.popen(aaa).read()
>>> print bbb
>>> bbb
''
>>>
为什么bbb是空啊?