Reputation: 11
How do I make the python shell print/show the commands that is done exactly when its done?
For an example is, If my python file contains:
variable = something
IF variable == something:
print “hello”
So when I run the file in python shell, I want it to print all the commands as they are executed.
Upvotes: 0
Views: 81
Reputation: 4446
You can use the built-in trace module
python3 -m trace --trace file.py
Upvotes: 3