Home

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

previous
next

How can I replace all occurrences of a character with another character in std string?
Re: am I developing C++ skills ?
Re: cpython list __str__ method for floats
Re: The private-inheritance variant allows Car to override Engine's virtual functions
Need a minimal, easily-modifiable HTTP proxy
Nasze Dzieci
Krwinka
Pajacyk
Fundacja Hobbit
Niechciane i Zapomniane