summaryrefslogtreecommitdiff
path: root/ttystatus/status.py
diff options
context:
space:
mode:
Diffstat (limited to 'ttystatus/status.py')
-rw-r--r--ttystatus/status.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/ttystatus/status.py b/ttystatus/status.py
index 8f17159..b51c5c5 100644
--- a/ttystatus/status.py
+++ b/ttystatus/status.py
@@ -19,8 +19,12 @@ class TerminalStatus(object):
'''Show status and progress information on a terminal.'''
def __init__(self):
- self._widgets = []
+ self.clear()
def add(self, widget):
'''Add a new widget to the status display.'''
self._widgets.append(widget)
+
+ def clear(self):
+ '''Remove all widgets.'''
+ self._widgets = []