Show More
@@ -44,6 +44,12 b' if ispy3:' | |||
|
44 | 44 | ospathsep = os.pathsep.encode('ascii') |
|
45 | 45 | ossep = os.sep.encode('ascii') |
|
46 | 46 | |
|
47 | # TODO: .buffer might not exist if std streams were replaced; we'll need | |
|
48 | # a silly wrapper to make a bytes stream backed by a unicode one. | |
|
49 | stdin = sys.stdin.buffer | |
|
50 | stdout = sys.stdout.buffer | |
|
51 | stderr = sys.stderr.buffer | |
|
52 | ||
|
47 | 53 | # Since Python 3 converts argv to wchar_t type by Py_DecodeLocale() on Unix, |
|
48 | 54 | # we can use os.fsencode() to get back bytes argv. |
|
49 | 55 | # |
@@ -100,6 +106,9 b' else:' | |||
|
100 | 106 | osname = os.name |
|
101 | 107 | ospathsep = os.pathsep |
|
102 | 108 | ossep = os.sep |
|
109 | stdin = sys.stdin | |
|
110 | stdout = sys.stdout | |
|
111 | stderr = sys.stderr | |
|
103 | 112 | sysargv = sys.argv |
|
104 | 113 | |
|
105 | 114 | stringio = io.StringIO |
@@ -54,6 +54,9 b' httpserver = pycompat.httpserver' | |||
|
54 | 54 | pickle = pycompat.pickle |
|
55 | 55 | queue = pycompat.queue |
|
56 | 56 | socketserver = pycompat.socketserver |
|
57 | stderr = pycompat.stderr | |
|
58 | stdin = pycompat.stdin | |
|
59 | stdout = pycompat.stdout | |
|
57 | 60 | stringio = pycompat.stringio |
|
58 | 61 | urlerr = pycompat.urlerr |
|
59 | 62 | urlparse = pycompat.urlparse |
@@ -62,6 +65,7 b' xmlrpclib = pycompat.xmlrpclib' | |||
|
62 | 65 | |
|
63 | 66 | if os.name == 'nt': |
|
64 | 67 | from . import windows as platform |
|
68 | stdout = platform.winstdout(pycompat.stdout) | |
|
65 | 69 | else: |
|
66 | 70 | from . import posix as platform |
|
67 | 71 |
General Comments 0
You need to be logged in to leave comments.
Login now