Show More
@@ -69,7 +69,8 b' if ispy3:' | |||||
69 | # |
|
69 | # | |
70 | # TODO: On Windows, the native argv is wchar_t, so we'll need a different |
|
70 | # TODO: On Windows, the native argv is wchar_t, so we'll need a different | |
71 | # workaround to simulate the Python 2 (i.e. ANSI Win32 API) behavior. |
|
71 | # workaround to simulate the Python 2 (i.e. ANSI Win32 API) behavior. | |
72 | sysargv = list(map(os.fsencode, sys.argv)) |
|
72 | if getattr(sys, 'argv', None) is not None: | |
|
73 | sysargv = list(map(os.fsencode, sys.argv)) | |||
73 |
|
74 | |||
74 | def bytechr(i): |
|
75 | def bytechr(i): | |
75 | return bytes([i]) |
|
76 | return bytes([i]) | |
@@ -173,7 +174,8 b' else:' | |||||
173 | stdin = sys.stdin |
|
174 | stdin = sys.stdin | |
174 | stdout = sys.stdout |
|
175 | stdout = sys.stdout | |
175 | stderr = sys.stderr |
|
176 | stderr = sys.stderr | |
176 | sysargv = sys.argv |
|
177 | if getattr(sys, 'argv', None) is not None: | |
|
178 | sysargv = sys.argv | |||
177 | sysplatform = sys.platform |
|
179 | sysplatform = sys.platform | |
178 | getcwd = os.getcwd |
|
180 | getcwd = os.getcwd | |
179 | sysexecutable = sys.executable |
|
181 | sysexecutable = sys.executable |
General Comments 0
You need to be logged in to leave comments.
Login now