开发者

show linux process [Python]

开发者 https://www.devze.com 2023-01-13 07:14 出处:网络
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 \"vie

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

精彩评论

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