views:

656

answers:

1

This is useful for debugging (hence programming related). On linux, we can use the command

strace -feopen python myfile.py

to figure out which python modules and shared objects are loaded. Is there an equivalent one-liner on macOS X?

+5  A: 

I suppose you meant strace -fetrace=open?

dtruss -f -t open python myfile.py
ephemient
Hi ephemient, I just tested your version of strace (with -fetrace=open) and it gave exactly the same outuput as my example. I look forward to testing your dtruss command shortly. Thanks for the quick response!
SetJmp