use sys.stdout instead of print to support Py2.7

This commit is contained in:
Yoav Ram
2016-12-15 11:02:55 +02:00
committed by GitHub
parent 090b3491a6
commit bbce12db75
+2 -1
View File
@@ -38,7 +38,8 @@ class Spinner(object):
def __exit__(self, exc_type, exc_val, exc_tb):
self.stop()
if self.beep:
print("\7", end='', flush=True)
sys.stdout.write('\7')
sys.stdout.flush()
return False