Show More
@@ -38,6 +38,7 b' if ispy3:' | |||||
38 | import builtins |
|
38 | import builtins | |
39 | import functools |
|
39 | import functools | |
40 | import io |
|
40 | import io | |
|
41 | import struct | |||
41 |
|
42 | |||
42 | fsencode = os.fsencode |
|
43 | fsencode = os.fsencode | |
43 | fsdecode = os.fsdecode |
|
44 | fsdecode = os.fsdecode | |
@@ -73,8 +74,7 b' if ispy3:' | |||||
73 | if getattr(sys, 'argv', None) is not None: |
|
74 | if getattr(sys, 'argv', None) is not None: | |
74 | sysargv = list(map(os.fsencode, sys.argv)) |
|
75 | sysargv = list(map(os.fsencode, sys.argv)) | |
75 |
|
76 | |||
76 | def bytechr(i): |
|
77 | bytechr = struct.Struct('>B').pack | |
77 | return bytes([i]) |
|
|||
78 |
|
78 | |||
79 | def iterbytestr(s): |
|
79 | def iterbytestr(s): | |
80 | """Iterate bytes as if it were a str object of Python 2""" |
|
80 | """Iterate bytes as if it were a str object of Python 2""" |
General Comments 0
You need to be logged in to leave comments.
Login now