O
O
oshoshh2020-05-12 23:59:01
Python
oshoshh, 2020-05-12 23:59:01

How to display all processes running on the PC?

How to display all the processes running on the PC, and so that they are all in line?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
#
# ., 2020-05-13
@andro1

Using the os library

import os

tasklist = os.popen('tasklist').read()
print(tasklist)

R
Roman Novikov, 2020-05-15
@Very_cool_programmer

Using the subprocess library:pip install subprocess

import subprocess as sp

tasks=sp.getoutput('tasklist');
print(tasks);

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question