On Thu, Nov 25, 2021 at 9:52 AM Barry <ba...@barrys-emacs.org> wrote:
> You can replace sys.stdout with your own object that prints to a list of > streams. > I have used this in the past. > I think was essentially the OP's suggestion #4: 4. add to the standard io library a new class which gives you the write > interface of a single stream, but is a wrapper that will write to multiple > streams: > Except that it would be in the stdlib. "note very two line function needs to be in the stlib" -- but I'm guessing that there might be some subtleties to make it truly robust, so it may be worth adding. Also, from a newbie script-writers perspective, that few-line class is a bit complex. -CHB -- Christopher Barker, PhD (Chris) Python Language Consulting - Teaching - Scientific Software Development - Desktop GUI and Web Development - wxPython, numpy, scipy, Cython
_______________________________________________ Python-ideas mailing list -- python-ideas@python.org To unsubscribe send an email to python-ideas-le...@python.org https://mail.python.org/mailman3/lists/python-ideas.python.org/ Message archived at https://mail.python.org/archives/list/python-ideas@python.org/message/M4WAS6RIZYR65XTPRJOLWQSHE4Y36NJD/ Code of Conduct: http://python.org/psf/codeofconduct/