From 0d93553e914d8aeb7eaf5d903f2d082ee7ec5a83 Mon Sep 17 00:00:00 2001 From: Lars Wirzenius Date: Wed, 31 Aug 2011 16:23:17 +0100 Subject: Update docs to show example of .format() usage. --- doc/index.rst | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'doc') diff --git a/doc/index.rst b/doc/index.rst index 5f671bf..7119d5d 100644 --- a/doc/index.rst +++ b/doc/index.rst @@ -25,11 +25,8 @@ Here's an example program that searches for symlinks in a directory tree:: import ttystatus ts = ttystatus.TerminalStatus(period=0.1) - 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')) + ts.format('%ElapsedTime() Looking for files: %Counter(pathname) found, ' + 'currently in %Pathname(dirname)') pathnames = [] for dirname, subdirs, basenames in os.walk(sys.argv[1]): -- cgit v1.2.1