debugging - Python's sys.settrace won't create c_call events -
the documentation sys.settrace
says can report calls c or builtin functions. when try following program, expect see c_call
event, nothing happens:
import sys def tracer(frame, event, arg): print(frame, event, arg) return tracer sys.settrace(tracer) x = len([1,2,3])
any ideas what's wrong here?
can post example use of sys.settrace
generates c_call
event?
edit: tried python 3.2, , gave me no events. tried python 2.7 , gave me 2 call
-s (not c_call
-s). still weird.
the docs wrong, c_call
events never sent trace function: http://bugs.python.org/issue17799
Comments
Post a Comment