<div dir="ltr">Hi,<div><br></div><div style>I am puzzled. The documentation mentions writable .f_trace attribute for a frame.</div><div>"if not None, is a function called at the start of each source code line"<br>

</div><div><div><a href="http://docs.python.org/2/reference/datamodel.html#types">http://docs.python.org/2/reference/datamodel.html#types</a></div><div><br></div><div style>But there is also a trace function set by sys.settrace with 'line' event</div>

<div style><a href="http://docs.python.org/2/library/sys.html#sys.settrace">http://docs.python.org/2/library/sys.html#sys.settrace</a><br></div><div style><br></div><div style>What's the difference? Why the f_trace is needed?</div>

<div style><br></div><div style>It is also unclear who sets f_trace, because it should be set at the beginning of each frame before the frame starts executing.</div><div style><br></div><div style><br></div><div style>Why do I need it? I wanted to make a scroller for a live Python code long ago, and now that I am deep inside Python frames (thanks to xtrace bugreport I got earlier) it sounds like a good time for it.</div>

<div style><br></div><div style>The only concern I have is if 'line' event will be enough to cover all the code that Python executes in settrace set function.</div><div>-- <br>anatoly t.</div>
</div></div>