New submission from Antoine Pitrou: Right now it is probably possible using something like:
handler.acquire() try: handler.flush() handler.stream = new_stream finally: handler.release() but it would be nice to have an officially-supported method to do that. Context: if I reconfigure sys.stderr, I'd like to update all handlers that have a reference to the old sys.stderr. ---------- messages: 294820 nosy: pitrou, vinay.sajip priority: normal severity: normal status: open title: Allow replacing a StreamHandler's stream type: enhancement versions: Python 3.7 _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue30522> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com