diff options
author | Lars Wirzenius <liw@liw.fi> | 2010-06-13 20:52:45 +1200 |
---|---|---|
committer | Lars Wirzenius <liw@liw.fi> | 2010-06-13 20:52:45 +1200 |
commit | f188b3cee956afe0b7264712a7e47e5875603367 (patch) | |
tree | 3a233cb0caa6dce8d69d62f96458b5d8b1b1b959 /example.py | |
parent | 705f90a2108a22c4cf1ab334ebb98b1f00620fa3 (diff) | |
download | ttystatus-f188b3cee956afe0b7264712a7e47e5875603367.tar.gz |
Add RemainingTime to example.py.
Updates to RemainingTime tests, as well.
Diffstat (limited to 'example.py')
-rw-r--r-- | example.py | 8 |
1 files changed, 5 insertions, 3 deletions
@@ -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() |