From db1db36ce190fb815f645ba216d246df001f4900 Mon Sep 17 00:00:00 2001 From: Alan Justino Date: Sat, 12 Oct 2019 16:46:31 +0200 Subject: [PATCH] sys.__std{in,out,err}__ --- Lib/_sitebuiltins.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Lib/_sitebuiltins.py b/Lib/_sitebuiltins.py index f6a0e1c2e..f1b39710e 100644 --- a/Lib/_sitebuiltins.py +++ b/Lib/_sitebuiltins.py @@ -10,9 +10,9 @@ The objects used by the site module to add custom builtins. import sys -sys.stdin = getattr(sys, 'stdin', False) or open('/dev/stdin') -sys.stdout = getattr(sys, 'stdout', False) or open('/dev/stdout', 'w') -sys.stderr = getattr(sys, 'stderr', False) or open('/dev/stderr', 'w') +sys.stdin = sys.__stdin__ = getattr(sys, '__stdin__', False) or open('/dev/stdin') +sys.stdout = sys.__stdin__ = getattr(sys, '__stdout__', False) or open('/dev/stdout', 'w') +sys.stderr = sys.__stdin__ = getattr(sys, '__stderr__', False) or open('/dev/stderr', 'w') class Quitter(object):