How to list all dlls loaded by a process with Pyth

2019-03-15 21:43发布

I want to list all the dlls loaded by a process, like this:

enter image description here

How could I get the information with Python on Windows?

2条回答
【Aperson】
2楼-- · 2019-03-15 22:16

Using the package psutil it is (now) even possible to get a portable solution! :-)

# e.g. finding the shared libs (dll/so) our python process loaded so far ...
import psutil, os
p = psutil.Process( os.getpid() )
for dll in p.memory_maps():
  print dll.path
查看更多
Summer. ? 凉城
3楼-- · 2019-03-15 22:20

Using listdlls:

import os
os.system('listdlls PID_OR_PROCESS_NAME_HERE')
查看更多
登录 后发表回答