Fix Spinner

This commit is contained in:
Robin Richtsfeld
2023-04-12 02:26:30 +02:00
committed by GitHub
parent d7b747600d
commit 8d7e0153f0

View File

@@ -20,7 +20,7 @@ class Spinner:
sys.stdout.write(next(self.spinner) + " " + self.message + "\r")
sys.stdout.flush()
time.sleep(self.delay)
sys.stdout.write('\b' * (len(self.message) + 2))
sys.stdout.write('\r' + ' ' * (len(self.message) + 2) + '\r')
def __enter__(self):
"""Start the spinner"""