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

Popular posts from this blog

c# - Send Image in Json : 400 Bad request -

jquery - Fancybox - apply a function to several elements -

An easy way to program an Android keyboard layout app -