What cool hacks can be done using sys.settrace?

前端 未结 7 1644
無奈伤痛
無奈伤痛 2020-12-13 02:51

I love being able to modify the arguments the get sent to a function, using settrace, like :

import sys

def trace_func(frame,event,arg):
    va         


        
7条回答
  •  轮回少年
    2020-12-13 03:54

    I made a module called pycallgraph which generates call graphs using sys.settrace().

提交回复
热议问题