Skip to content

Commit bbce12d

Browse files
author
Yoav Ram
authored
use sys.stdout instead of print to support Py2.7
1 parent 090b349 commit bbce12d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

click_spinner/__init__.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,8 @@ def __enter__(self):
3838
def __exit__(self, exc_type, exc_val, exc_tb):
3939
self.stop()
4040
if self.beep:
41-
print("\7", end='', flush=True)
41+
sys.stdout.write('\7')
42+
sys.stdout.flush()
4243
return False
4344

4445

0 commit comments

Comments
 (0)