Please suggest Python command which is equivalent of set -x in shell scripts.
set -x
Is there a way to print/log each source file line executed by Python?
You can use the trace module:
python -m trace -t your_script.py
The command line above will display every line of code as it is executed.