##// END OF EJS Templates
py3: add a bytes version of os.name...
Pulkit Goyal -
r30302:3874ddba default
parent child Browse files
Show More
@@ -10,6 +10,7 b' This contains aliases to hide python ver'
10
10
11 from __future__ import absolute_import
11 from __future__ import absolute_import
12
12
13 import os
13 import sys
14 import sys
14
15
15 ispy3 = (sys.version_info[0] >= 3)
16 ispy3 = (sys.version_info[0] >= 3)
@@ -34,9 +35,10 b' else:'
34 if ispy3:
35 if ispy3:
35 import builtins
36 import builtins
36 import functools
37 import functools
37 import os
38 fsencode = os.fsencode
38 fsencode = os.fsencode
39 fsdecode = os.fsdecode
39 fsdecode = os.fsdecode
40 # A bytes version of os.name.
41 osname = os.name.encode('ascii')
40
42
41 def sysstr(s):
43 def sysstr(s):
42 """Return a keyword str to be passed to Python functions such as
44 """Return a keyword str to be passed to Python functions such as
@@ -82,6 +84,8 b' else:'
82 def fsdecode(filename):
84 def fsdecode(filename):
83 return filename
85 return filename
84
86
87 osname = os.name
88
85 stringio = io.StringIO
89 stringio = io.StringIO
86 empty = _queue.Empty
90 empty = _queue.Empty
87 queue = _queue.Queue
91 queue = _queue.Queue
General Comments 0
You need to be logged in to leave comments. Login now