summaryrefslogtreecommitdiff
path: root/ttystatus/status.py
diff options
context:
space:
mode:
Diffstat (limited to 'ttystatus/status.py')
-rw-r--r--ttystatus/status.py14
1 files changed, 14 insertions, 0 deletions
diff --git a/ttystatus/status.py b/ttystatus/status.py
index 77f0b18..a5c40d1 100644
--- a/ttystatus/status.py
+++ b/ttystatus/status.py
@@ -118,7 +118,21 @@ class TerminalStatus(object):
if self._m.enabled and self._m.time_to_write():
self._write()
+ def hide(self): # pragma: no cover
+ '''Hide current progress report.
+
+ Use .flush() to make it visible again. Hiding is useful if you
+ want to write things to stdout/stderr that might get mixed
+ with progress output. The .notify() and .error() methods get
+ disabled if progress reporting gets disabled, but .hide()
+ doesn't.
+
+ '''
+
+ self._m.clear()
+
def flush(self):
+
'''Force an update of current state to the screen.
This happens even if it is not yet time to output the screen.