def main(argv):
  pygame.init()
  h = pygame.display.Info().current_h * 4 // 5
  pygame.display.set_mode((h * 16 // 9, h))
  pygame.display.set_caption("Waiting for data...")
  while True:
    a, b = sys.stdin.readline(), sys.stdin.readline()
    if not a or not b:
      break
    screen = pygame.display.get_surface()
    screen.fill((70, 120, 173))
    sys.stdout.write(a + b)
    sys.stdout.flush()
    img_a, img_b = process_image(h, a.strip()), process_image(h, b.strip())
    w2 = screen.get_width() // 2
    epsilon = screen.get_width() // 200
    screen.blit(img_a, (w2 - epsilon - img_a.get_width(), 0))
    screen.blit(img_b, (w2 + epsilon, 0))
    pygame.display.set_caption("%s | %s" % (a.strip(), b.strip()))
    pygame.display.update()
dataset/ETHPy150Open google/linear-book-scanner/sane/vsane.py/main/swapped operands of `-`