I'd like to profile some basic Python scripts to see how they vary in the number of bytecode instructions executed. I've been playing around with dis but haven't discovered how to do this.
I'm not talking about the amount of bytecode for a certain .py file -- I'm talking about the number of bytecode instructions executed in a particular runthrough.
The bigger picture is that I'd like to have a measure of the relative complexity of various scripts as you work out the code by hand---but for very simple intro to programming problems.
Thanks for any help!