We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ceef840 commit 394b8caCopy full SHA for 394b8ca
1 file changed
bpython/cli.py
@@ -157,7 +157,7 @@ def readline(self, size=-1):
157
158
curses.raw(True)
159
try:
160
- while not (buffer.endswith('\n') or buffer.endswith('\r')):
+ while not buffer.endswith(('\n', '\r')):
161
key = self.interface.get_key()
162
if key in [curses.erasechar(), 'KEY_BACKSPACE']:
163
y, x = self.interface.scr.getyx()
@@ -1638,6 +1638,7 @@ def gethw():
1638
"""
1639
1640
if platform.system() != 'Windows':
1641
+ import struct
1642
h, w = struct.unpack(
1643
"hhhh",
1644
fcntl.ioctl(sys.__stdout__, termios.TIOCGWINSZ, "\000" * 8))[0:2]
0 commit comments