Find which python modules are being imported

后端 未结 4 867
有刺的猬
有刺的猬 2021-01-31 08:16

What\'s an easy way of finding all the python modules from a particular package that are being used in an application?

4条回答
  •  眼角桃花
    2021-01-31 08:45

    I think modulefinder is what you're looking for. You can use modulefinder.py directly, running it as a script as is described there, or you can import the module and then create a report using the modulefinder.ModuleFinder class.

提交回复
热议问题