Skip to content

Commit

Permalink
Merge with master #39
Browse files Browse the repository at this point in the history
  • Loading branch information
winterjung committed Jan 4, 2018
2 parents 65e357b + 0b667ac commit 8205734
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 3 deletions.
20 changes: 20 additions & 0 deletions examples/stream_change.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# -*- coding: utf-8 -*-
"""Example for changing stream
"""
from __future__ import unicode_literals, absolute_import, print_function
import os
import time
import random

os.sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))

from halo import Halo

import sys

spinner = Halo(stream=sys.stderr)

spinner.start()
spinner.stop()

print("Testing")
4 changes: 2 additions & 2 deletions halo/halo.py
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,7 @@ def start(self, text=None):
return self

if self._stream.isatty():
cursor.hide()
cursor.hide(stream=self._stream)

self._stop_spinner = threading.Event()
self._spinner_thread = threading.Thread(target=self.render)
Expand Down Expand Up @@ -355,7 +355,7 @@ def stop(self):
self.clear()

if self._stream.isatty():
cursor.show()
cursor.show(stream=self._stream)

return self

Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
backports.shutil_get_terminal_size==1.0.0
log_symbols==0.0.11
spinners==0.0.19
cursor==1.1.0
cursor==1.2.0
termcolor==1.1.0
colorama==0.3.9
six==1.11.0

0 comments on commit 8205734

Please sign in to comment.