On 2/25/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > >> I just noticed that cProfile (like profile) prints to stdout. Yuck. > > Guido> Can you clarify? Why is it wrong to send the output of the > Guido> profiler to stdout? > > If the program emits a bunch of output of its own I want to keep it separate > from what is arguably the debug output of the profiler (even though the > profiler prints all its output at the end): > > foo.py > /dev/null 2> foo.prof > > Guido> It seems to make sense to me that you should be able to redirect > Guido> the profiler's output to a file with a simple ">file". > > It is currently impossible to separate profile output from the program's > output.
It is if you use the "advanced" use of the profiler -- the profiling run just saves the profiling data to a file, and the pstats module invoked separately prints the output. -- --Guido van Rossum (home page: http://www.python.org/~guido/) _______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com