##// END OF EJS Templates
py3: have a bytes version of sys.platform...
Pulkit Goyal -
r30624:a82a6eee default
parent child Browse files
Show More
@@ -50,6 +50,7 b' if ispy3:'
50 # os.getcwd() on Python 3 returns string, but it has os.getcwdb() which
50 # os.getcwd() on Python 3 returns string, but it has os.getcwdb() which
51 # returns bytes.
51 # returns bytes.
52 getcwd = os.getcwdb
52 getcwd = os.getcwdb
53 sysplatform = sys.platform.encode('ascii')
53
54
54 # TODO: .buffer might not exist if std streams were replaced; we'll need
55 # TODO: .buffer might not exist if std streams were replaced; we'll need
55 # a silly wrapper to make a bytes stream backed by a unicode one.
56 # a silly wrapper to make a bytes stream backed by a unicode one.
@@ -153,6 +154,7 b' else:'
153 stdout = sys.stdout
154 stdout = sys.stdout
154 stderr = sys.stderr
155 stderr = sys.stderr
155 sysargv = sys.argv
156 sysargv = sys.argv
157 sysplatform = sys.platform
156 getcwd = os.getcwd
158 getcwd = os.getcwd
157
159
158 stringio = io.StringIO
160 stringio = io.StringIO
General Comments 0
You need to be logged in to leave comments. Login now