We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5c5ef4e commit acdc21bCopy full SHA for acdc21b
test/pseudo-tty/pty_helper.py
@@ -25,8 +25,12 @@ def pipe(sfd, dfd):
25
if dfd == STDOUT:
26
# Work around platform quirks. Some platforms echo ^D as \x04
27
# (AIX, BSDs) and some don't (Linux).
28
- filt = lambda c: ord(c) > 31 or c in '\t\n\r\f'
+ #
29
+ # The comparison against b' '[0] is because |data| is
30
+ # a string in python2 but a bytes object in python3.
31
+ filt = lambda c: c >= b' '[0] or c in b'\t\n\r\f'
32
data = filter(filt, data)
33
+ data = bytes(data)
34
35
while data:
36
try:
0 commit comments