mejor orden
This commit is contained in:
parent
4712901043
commit
519d7429e0
@ -11,13 +11,14 @@ def reporta(p):
|
|||||||
print(eighths_scale(p, scale), p.name())
|
print(eighths_scale(p, scale), p.name())
|
||||||
|
|
||||||
|
|
||||||
|
# walk from init
|
||||||
p = psutil.Process(pid=random.choice(psutil.pids()))
|
p = psutil.Process(pid=1)
|
||||||
print('random chose', reporta(p))
|
|
||||||
|
|
||||||
|
|
||||||
while True:
|
while True:
|
||||||
|
reporta(p)
|
||||||
|
|
||||||
sleep(1)
|
sleep(1)
|
||||||
|
|
||||||
children = p.children()
|
children = p.children()
|
||||||
|
|
||||||
if children:
|
if children:
|
||||||
@ -25,11 +26,10 @@ while True:
|
|||||||
for subp in
|
for subp in
|
||||||
children]))
|
children]))
|
||||||
print("\t↳", end="")
|
print("\t↳", end="")
|
||||||
reporta(p)
|
|
||||||
|
|
||||||
else:
|
else:
|
||||||
p = psutil.Process(pid=random.choice(psutil.pids()))
|
p = psutil.Process(pid=random.choice(psutil.pids()))
|
||||||
print('→', end="")
|
print('→', end="")
|
||||||
reporta(p)
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user