title: Python trace module - Trace lines as they are executed, but save to file, rather than stdout
body: <p>I want to trace the lines of a python script as they are executed. However the programme I use needs to print things to stdout. The trace option to the python trace module prints them to stdout. Is there anwyay to tell it to not print them to stdout, but instead save them to a file? I tried setting the <code>outfile</code> parameter, but it doesn't stop the printing of trace lines.</p>