Improved spinner
This commit is contained in:
		| @@ -20,16 +20,13 @@ class SpinnerThread(threading.Thread): | |||||||
|         print('\t', end='') |         print('\t', end='') | ||||||
|         spinner = self._spinner() |         spinner = self._spinner() | ||||||
|         while self._is_spinning: |         while self._is_spinning: | ||||||
|             # self._console.write(next(spinner)) |  | ||||||
|             print(next(spinner), end='') |             print(next(spinner), end='') | ||||||
|             time.sleep(0.1) |             time.sleep(0.1) | ||||||
|             # self._console.write('\b') |  | ||||||
|             print('\b', end='') |             print('\b', end='') | ||||||
|  |  | ||||||
|             sys.stdout.flush() |             sys.stdout.flush() | ||||||
|  |  | ||||||
|         # self._console.write(' ') |         print('done', end='') | ||||||
|         print(' ', end='') |  | ||||||
|  |  | ||||||
|     def stop_spinning(self): |     def stop_spinning(self): | ||||||
|         self._is_spinning = False |         self._is_spinning = False | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user