diff --git a/logdif.py b/logdif.py index e42f5b8..876fb8e 100644 --- a/logdif.py +++ b/logdif.py @@ -5,6 +5,7 @@ which should be in the branch where logdif.py is running """ import sys +from readchar import readchar from subprocess import check_output branches = sys.argv[1:3] @@ -91,12 +92,13 @@ def print_commit(line): output.append(f'{no:3}:{iline[0]}') iline[1] = '' # clear title else: - output.append(' ' * 11) + output.append(' ' * 12) if visible: print(' '.join(output), title) cnt[0] += 1 if cnt[0] % 50 == 0: - if input(f' {br0:11s} {br1:11s}--- press any letter to continue, return to stop ---') == '': + print(f' {br0:12s} {br1:12s}--- press any letter to continue, return to stop ---') + if readchar() in 'q\n': raise StopIteration()