Skip to content

Commit 3bcdf99

Browse files
committed
use trace
1 parent c1fcbb7 commit 3bcdf99

File tree

2 files changed

+11
-10
lines changed

2 files changed

+11
-10
lines changed

Lib/_pyrepl/reader.py

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -686,14 +686,12 @@ def refresh(self) -> None:
686686
"""Recalculate and refresh the screen."""
687687
if self.in_bracketed_paste and self.buffer and not self.buffer[-1] == "\n":
688688
return
689-
print("self.console = ", self.console)
690-
print("self.buffer = ", self.buffer)
689+
691690
# this call sets up self.cxy, so call it first.
692691
self.screen = self.calc_screen()
693-
print("self.screen = ", self.screen)
694-
print("self.cxy = ", self.cxy)
692+
695693
self.console.refresh(self.screen, self.cxy)
696-
print("self.console.refresh(self.screen, self.cxy) done")
694+
697695
self.dirty = False
698696

699697
def do_cmd(self, cmd: tuple[str, list[str]]) -> None:
@@ -702,7 +700,6 @@ def do_cmd(self, cmd: tuple[str, list[str]]) -> None:
702700
of single-character strings."""
703701

704702
trace("received command {cmd}", cmd=cmd)
705-
print("received command ", cmd)
706703
if isinstance(cmd[0], str):
707704
command_type = self.commands.get(cmd[0], commands.invalid_command)
708705
elif isinstance(cmd[0], type):
@@ -715,13 +712,11 @@ def do_cmd(self, cmd: tuple[str, list[str]]) -> None:
715712

716713
self.after_command(command)
717714

718-
print("self.dirty = ", self.dirty)
719715
if self.dirty:
720716
self.refresh()
721717
else:
722718
self.update_cursor()
723719

724-
print("self.refresh() or self.update_cursor() done")
725720

726721
if not isinstance(cmd, commands.digit_arg):
727722
self.last_command = command_type

Lib/_pyrepl/unix_console.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -266,8 +266,14 @@ def refresh(self, screen, c_xy):
266266

267267
oldscr = self.screen[old_offset : old_offset + height]
268268
newscr = screen[offset : offset + height]
269-
print("oldscr = ", oldscr)
270-
print("newscr = ", newscr)
269+
trace("self.screen")
270+
trace(self.screen)
271+
trace("screen")
272+
trace(screen)
273+
trace("oldscr")
274+
trace(oldscr)
275+
trace("newscr")
276+
trace(newscr)
271277

272278
# use hardware scrolling if we have it.
273279
if old_offset > offset and self._ri:

0 commit comments

Comments
 (0)