Message225412
> but still not very elegant. You're also repeating the stream on every occurrence, so easy to leave it out by mistake.
It might need more work to make a LoggerWriter work with sys.stdout [i.e. allowing sys.stdout = LoggerWriter()], which seems to be the only way to avoid passing a file= each time. I'm not sure that write() and flush() would be sufficient for this - for example, an encoding attribute might be required. Feel free to suggest improvements. |
|
Date |
User |
Action |
Args |
2014-08-16 19:58:14 | vinay.sajip | set | recipients:
+ vinay.sajip, barry, rhettinger, pitrou, BreamoreBoy, numerodix, Saimadhav.Heblikar |
2014-08-16 19:58:14 | vinay.sajip | set | messageid: <1408219094.43.0.46620344686.issue22195@psf.upfronthosting.co.za> |
2014-08-16 19:58:14 | vinay.sajip | link | issue22195 messages |
2014-08-16 19:58:14 | vinay.sajip | create | |
|