Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
这对于调试很有用(因此与编程相关)。在linux上,我们可以使用命令
strace -feopen python myfile.py
找出加载了哪些 python 模块和共享对象。macOS X 上是否有等效的单行代码?
我想你的意思是strace -fetrace=open?
strace -fetrace=open
dtruss -f -t 打开 python myfile.py