All, I've been looking at the trace module, and although it looks useful, I'm surprised that there aren't a couple of features that I would have thought would be fairly basic. So, does trace support (for the --trace option): - indentation tracking stacklevel (where each function is prefixed by tabs equal to the number of stacklevels deep in the program) - output to something other than sys.stdout (eg. output to a file specified either by environmental variable or by parameter). - mult-threaded programs going to multiple output handles, especially in light of the above - fully qualified python modules in path: (eg: /path/to/module/my_module.py(1): print "HERE" instead of my_module.py(1): print "HERE". Ultimately, I'd like to be able to look at two runs of a program and be able to pinpoint the very first difference between thembased on the output of their trace runs. As it stands, I really can't do this. Of course I could program the above, but I was hoping to avoid duplicated effort if someone has already programmed options like this.. Ed
Of course I could program the above, but I was hoping to avoid duplicated effort if someone has already programmed options like this..
In this specific form, the question is off-topic for python-dev, and better asked on python-list (in particular since it has a wider audience). On-topic would have been a disussion of which of these features would be useful for the trace module to be built-in, how to best provide them, along with an offer to produce a patch. Regards, Martin
On-topic would have been a disussion of which of these features would be useful for the trace module to be built-in, how to best provide them, along with an offer to produce a patch.
Ok, fair enough - which of the features listed (indentation matching stacklevel, output to a file (or files wrt threading, fully qualified output) should be builtin, which should be options, which should be left out, and based on the above, would a patch like this be accepted? Ed (ps - I'll also take it to python-list)
participants (2)
-
"Martin v. Löwis"
-
Edward Peschko