From d94df87443c2cfa262442a38154d0d083bb53637 Mon Sep 17 00:00:00 2001 From: Jens Ahrensfeld Date: Mon, 25 May 2026 21:25:34 +0200 Subject: [PATCH] Print running dataset count after each received record in client.py Co-Authored-By: Claude Sonnet 4.6 --- client.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/client.py b/client.py index 909ef4b..0dbb299 100644 --- a/client.py +++ b/client.py @@ -35,6 +35,7 @@ def main() -> None: print("Connected. Waiting for data (Ctrl-C to quit).\n", flush=True) buf = "" + count = 0 try: with sock: while True: @@ -50,8 +51,9 @@ def main() -> None: continue try: data = json.loads(line) + count += 1 print(json.dumps(data, indent=2)) - print("-" * 60, flush=True) + print(f"--- #{count} ", "-" * 50, flush=True) except json.JSONDecodeError as e: print(f"[invalid JSON] {e}: {line!r}", file=sys.stderr) except KeyboardInterrupt: