trace options

Edward Peschko horos11 at
Thu Jun 25 14:56:45 CEST 2009


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/ print "HERE"

     instead of 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 implement the above, but I was
hoping to avoid duplicated effort if someone has
already implemented options like this..I posted the above to
the python-dev list, they suggested I take it here, so any help
would be appreciated.


More information about the Python-list mailing list