mirror of
https://github.com/RustPython/RustPython.git
synced 2026-10-29 03:04:38 +08:00
sys.__std{in,out,err}__
This commit is contained in:
1 parent
084cd0ae3d
commit
db1db36ce1
1 file changed
+3
-3
Vendored
+3
-3
@@ -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):
|
||||
|
||||
Reference in new issue
Block a user