반응형
[python] List of running process using python
import psutil
def listProcesses():
for proc in psutil.process_iter():
try:
pinfo = proc.as_dict(attrs=['pid', 'name'])
except psutil.NoSuchProcess:
pass
else:
print(pinfo)
반응형
'프로그래밍 > Python' 카테고리의 다른 글
[python] 파이썬 requirements.txt 처리 (0) | 2025.06.17 |
---|---|
[Python] 파이썬 python 데이터 처리 위한 기본 설치 라이브러리 (0) | 2025.06.17 |
[python] zimport - 수많은 python 패키지를 압축하여 관리 (github.com/waveware4ai) (0) | 2025.06.04 |
[AI] 벡터 DB 만들어 보기 (0) | 2025.05.27 |
[AI] **"Hallucination" (환각)** 할루시네이션 (0) | 2025.05.27 |