Answer the question
In order to leave comments, you need to log in
How to display the process name correctly?
I want to display only process names. Initially the code looks like this
import psutil
for proc in psutil.process_iter(['name']):
print(proc.info)
import psutil
for proc in psutil.process_iter(["name"]):
name = list(proc.info)
print(f"{name[0]}")
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question