Terry Reedy <tjre...@udel.edu> writes: > On 11/23/2010 3:02 PM, Chris Rebert wrote: > If you are using print or print(), you can redirect output to the > StringIO object with >>sfile or file=sfile. I use the latter in a > custom test function where I normally want output to the screen but > occasionally want to capture test reports.
Thanks for the info, but I was looking for a way to collect output without modifying the original function, similar to with-output-to-string in some schemes. -- Burton Samograd -- http://mail.python.org/mailman/listinfo/python-list