This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author vinay.sajip
Recipients BreamoreBoy, Saimadhav.Heblikar, barry, numerodix, pitrou, rhettinger, vinay.sajip
Date 2014-08-16.19:58:14
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1408219094.43.0.46620344686.issue22195@psf.upfronthosting.co.za>
In-reply-to
Content
> 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.
History
Date User Action Args
2014-08-16 19:58:14vinay.sajipsetrecipients: + vinay.sajip, barry, rhettinger, pitrou, BreamoreBoy, numerodix, Saimadhav.Heblikar
2014-08-16 19:58:14vinay.sajipsetmessageid: <1408219094.43.0.46620344686.issue22195@psf.upfronthosting.co.za>
2014-08-16 19:58:14vinay.sajiplinkissue22195 messages
2014-08-16 19:58:14vinay.sajipcreate