Код: Выделить всё
$ cat test.py
import time
print('hello')
time.sleep(3)
print('goodbye')
$ python -m trace -t test.py
--- modulename: test, funcname:
test.py(1): import time
test.py(2): print('hello')
hello
test.py(3): time.sleep(3)
test.py(4): print('goodbye')
goodbye
Подробнее здесь: https://stackoverflow.com/questions/796 ... g-executed
Мобильная версия