Skip to content

Commit

Permalink
1. fix the buf of sendcontrol
Browse files Browse the repository at this point in the history
  • Loading branch information
ddddhm1234 authored and andfoy committed Jul 15, 2023
1 parent 3fffa23 commit 4856f05
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions winpty/ptyprocess.py
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@ def sendcontrol(self, char):
a = ord(char)
if 97 <= a <= 122:
a = a - ord('a') + 1
byte = str(bytes([a]))
byte = bytes([a]).decode("ascii")
return self.pty.write(byte), byte
d = {'@': 0, '`': 0,
'[': 27, '{': 27,
Expand All @@ -294,7 +294,7 @@ def sendcontrol(self, char):
if char not in d:
return 0, ''

byte = str(bytes([d[char]]))
byte = bytes([d[char]]).decode("ascii")
return self.pty.write(byte), byte

def sendeof(self):
Expand Down

0 comments on commit 4856f05

Please sign in to comment.