开发者

show linux process [Python]

Guy how i can read all process work in my computer and print it

i want process read t开发者_JAVA百科hen print ?


one of the possible ways is to parse the output of some specialized system process "viewer" application

like:

import commands
cmd = 'ps ax'
for line in commands.getoutput(cmd).splitlines():
    # process the line
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜