On Sat, Dec 1, 2012 at 9:07 AM, Brian Theado <[email protected]> wrote:
> > [...] > > How does this compare to the python trace module ( > http://docs.python.org/2/library/trace.html)? It looks to me like > sherlock filters are more powerful as trace supports only 'ignoremods' and > 'ignoredirs'. Maybe there are other differences as well. > Presumably, it would be possible to subclass trace.Trace to enable on a def by def basis. Similar remarks apply to Python's logger classes. Simply having logging "levels" is feeble. Last year I wrote some code which inserts call tree output from the trace > module into leo headlines. If it sees the same function in multiple places > in the call tree, then it uses clones to avoid duplication. Having the > calltree in headlines makes it convenient to only expand those nodes which > are of interest. I posted the code here: > https://groups.google.com/d/topic/leo-editor/yLRMXw4Yvv4/discussion (as > mentioned there, my code was inspired by Ville's code in scripts.leo). > There is also the g.Tracer class. The docstring is: '''A "debugger" that computes a call graph. To trace a function and its callers, put the following at the function's start: g.startTracer() ''' Did you have a hand in this? > > Brian > e code of interest can be a big help in studying other people's code. > This is a non-invasive method: no tracing code needs to be inserted > anywhere. > Imo, this is the biggest plus. Edward -- You received this message because you are subscribed to the Google Groups "leo-editor" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/leo-editor?hl=en.
