diff options
author | Lars Wirzenius <liw@liw.fi> | 2010-07-07 09:41:02 +1200 |
---|---|---|
committer | Lars Wirzenius <liw@liw.fi> | 2010-07-07 09:41:02 +1200 |
commit | e6618ad0ed66ed459a55ecd903a5627dacf97915 (patch) | |
tree | fdd8b7ce20622f8df2d52274659895b8c7937410 /example.py | |
parent | 129e223f07e7d090655da2bfdaa6262cfa399f2e (diff) | |
download | python-ttystatus-e6618ad0ed66ed459a55ecd903a5627dacf97915.tar.gz |
Add a way for widgets to say "I'm always interested in updates".
Fix ElapsedTime to use that.
Diffstat (limited to 'example.py')
-rw-r--r-- | example.py | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -25,7 +25,8 @@ import ttystatus def main(): ts = ttystatus.TerminalStatus(period=0.1) - ts.add(ttystatus.Literal('Looking for files: ')) + ts.add(ttystatus.ElapsedTime()) + ts.add(ttystatus.Literal(' Looking for files: ')) ts.add(ttystatus.Counter('pathname')) ts.add(ttystatus.Literal(' found, currently in ')) ts.add(ttystatus.Pathname('dirname')) @@ -39,7 +40,8 @@ def main(): pathnames.append(pathname) ts.clear() - ts.add(ttystatus.Literal('Finding symlinks: ')) + ts.add(ttystatus.ElapsedTime()) + ts.add(ttystatus.Literal(' Finding symlinks: ')) ts.add(ttystatus.Counter('symlink')) ts.add(ttystatus.Literal(' found; now at ')) ts.add(ttystatus.Index('pathname', 'pathnames')) |