Istvan Albert wrote: > A solution would be writing the code with a logging function to begin > with, alas many times that is out of one's hand.
If the code has been written with calls to a builtin print function, the situation isn't much better. You could monkeypatch the print function, but that's probably worse than swapping sys.stdout. (I agree that print should be a function, simply because there's no strong reason for it *not* to be. But I don't think it makes a difference to this particular problem.) -- Greg -- http://mail.python.org/mailman/listinfo/python-list