문제

I want to know if there is an easy way to get the number of python bytecodes which are executed at runtime. I know I can modify the source code of the interpreter and get what I want, but it is better that there are some standard APIs or other easy ways.

도움이 되었습니까?

해결책

If you want to get to know the Python byte codes that are executed at run time then use.

sys.settrace

have a look at the dis module. This can tell you which byte code is in which line.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top