summaryrefslogtreecommitdiff
path: root/example.py
diff options
context:
space:
mode:
Diffstat (limited to 'example.py')
-rw-r--r--example.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/example.py b/example.py
index e12d0d7..a1a2c73 100644
--- a/example.py
+++ b/example.py
@@ -40,13 +40,15 @@ def main():
ts.clear()
ts.add(ttystatus.Literal('Finding symlinks: '))
+ ts.add(ttystatus.Counter('symlink'))
+ ts.add(ttystatus.Literal(' found; now at '))
ts.add(ttystatus.Index('pathname', 'pathnames'))
ts.add(ttystatus.Literal(' ('))
ts.add(ttystatus.PercentDone('done', 'total', decimals=2))
ts.add(ttystatus.Literal(' done) '))
+ ts.add(ttystatus.RemainingTime('done', 'total'))
+ ts.add(ttystatus.Literal(' '))
ts.add(ttystatus.ProgressBar('done', 'total'))
- ts.add(ttystatus.Counter('symlink'))
- ts.add(ttystatus.Literal(' symlinks found'))
ts['pathnames'] = pathnames
ts['done'] = 0
ts['total'] = len(pathnames)
@@ -55,7 +57,7 @@ def main():
ts['pathname'] = pathname
if os.path.islink(pathname):
ts['symlink'] = pathname
- ts.notify('Symlink! %s' % pathname)
+# ts.notify('Symlink! %s' % pathname)
ts['done'] += 1
ts.finish()