Merge pull request #878 from Androbin/patch-1

Fix Spinner
pull/929/head
Toran Bruce Richards 2023-04-12 19:22:31 +12:00 committed by GitHub
commit 4c6f18bc59
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

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"""