On Tue, Aug 12, 2014 at 9:56 AM, Steven D'Aprano
<steve+comp.lang.pyt...@pearwood.info> wrote:
> from __future__ import print_function
>
> _print = print
> _rlock = threading.RLock()
> def print(*args, **kwargs):
>     with _rlock:
>         _print(*args, **kwargs)

You're conflating print and stdout here. Do you know which one is the
cause of your problems? Alternatively, can you be certain that you
never use either without the other?

ChrisA
-- 
https://mail.python.org/mailman/listinfo/python-list

Reply via email to