# HG changeset patch # User Paul Boddie # Date 1481061496 -3600 # Node ID d6b253d49e991e3b01f76e63445310435b07f110 # Parent 8c75cdf1a76476fb1bdc0576c84853b004a765c1 Moved stdin, stdout, stderr to posix.io. diff -r 8c75cdf1a764 -r d6b253d49e99 lib/posix/io.py --- a/lib/posix/io.py Tue Dec 06 22:39:23 2016 +0100 +++ b/lib/posix/io.py Tue Dec 06 22:58:16 2016 +0100 @@ -71,6 +71,12 @@ _check_string(s) native._fwrite(self.__data__, s) +# Standard streams. + +stdin = sysstream(0) +stdout = sysstream(1, "w") +stderr = sysstream(2, "w") + # Input/output functions. def close(fd): pass diff -r 8c75cdf1a764 -r d6b253d49e99 lib/sys.py --- a/lib/sys.py Tue Dec 06 22:39:23 2016 +0100 +++ b/lib/sys.py Tue Dec 06 22:58:16 2016 +0100 @@ -20,15 +20,9 @@ """ from __builtins__.int import maxint, minint -from posix.io import sysstream +from posix.io import stdin, stdout, stderr import native -# Standard streams. - -stdin = sysstream(0) -stdout = sysstream(1, "w") -stderr = sysstream(2, "w") - # NOTE: Environment details to be implemented. argv = native._get_argv()