From 3c7f090e7ba8f157b73e74237887db1f0da5340f Mon Sep 17 00:00:00 2001 From: Julien Palard Date: Mon, 4 Jan 2021 16:41:32 +0100 Subject: [PATCH] Erase line before writing it, to avoid overlapping. --- ansible_parallel.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ansible_parallel.py b/ansible_parallel.py index 0ed3382..ab9f94b 100644 --- a/ansible_parallel.py +++ b/ansible_parallel.py @@ -111,6 +111,8 @@ async def show_progression(results): f"{truncate(', '.join(currently_running), max_width=100)}" ) print( + "\033[0J", # ED (Erase In Display) with parameter 0: + # Erase from the active position to the end of the screen. FRAMES[frameno % len(FRAMES)], f"{status_line:126}", end="\r",