I am writing a program (a GUI for easy control of several instruments at once) in Python that has a lot of dependencies. When I run it, one of the functions that I call produces several lines of output to the terminal:
[USB.DLL] - t_dev_open(0xffb50000) - ENTRY
[USB DLL] - t_dev_open() - d->num_channels:4
[USB.DLL] - t_dev_open(0xffb00000) - ENTRY
[USB DLL] - t_dev_open() - d->num_channels:4
[USB.DLL] - t_dev_open(0xffba0000) - ENTRY
[USB DLL] - t_dev_open() - d->num_channels:4
This is annoying, since the program is for others to use and I only want them to see output that is part of the user interface. I know exactly which function call in my code triggers it, but I have no details about what goes on under the hood. The library involved is the Thorlabs Scientific Camera SDK, which is mostly DLLs (although there is no USB.dll that I can find, which would have been my first guess based on the output). The function is TLCameraSDK.open_camera()
.
My question is, is there a way to easily trace this output and find out where it comes from? I'm on a windows machine using CMD, although if a Linux shell would be helpful I have access to that as well. Any answer that includes ideas for suppressing output from a .dll would be extra helpful, although that's probably for a separate question (I'll ask it once I've pinpointed the source).