diff options
author | Walter Dörwald <walter@livinglogic.de> | 2004-02-12 17:35:32 (GMT) |
---|---|---|
committer | Walter Dörwald <walter@livinglogic.de> | 2004-02-12 17:35:32 (GMT) |
commit | 70a6b49821a3226f55e9716f32d802d06640cb89 (patch) | |
tree | 3c8ca10c1fa09e025bd266cf855a00d7d96c55aa /Demo/scripts/lpwatch.py | |
parent | ecfeb7f095dfd9c1c8929bf3df858ee35e0d9e9e (diff) | |
download | cpython-70a6b49821a3226f55e9716f32d802d06640cb89.zip cpython-70a6b49821a3226f55e9716f32d802d06640cb89.tar.gz cpython-70a6b49821a3226f55e9716f32d802d06640cb89.tar.bz2 |
Replace backticks with repr() or "%r"
From SF patch #852334.
Diffstat (limited to 'Demo/scripts/lpwatch.py')
-rwxr-xr-x | Demo/scripts/lpwatch.py | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/Demo/scripts/lpwatch.py b/Demo/scripts/lpwatch.py index 9f051eb..00afba9 100755 --- a/Demo/scripts/lpwatch.py +++ b/Demo/scripts/lpwatch.py @@ -83,24 +83,24 @@ def makestatus(name, thisuser): lines.append(line) # if totaljobs: - line = `(totalbytes+1023)/1024` + ' K' + line = '%d K' % ((totalbytes+1023)/1024) if totaljobs <> len(users): - line = line + ' (' + `totaljobs` + ' jobs)' + line = line + ' (%d jobs)' % totaljobs if len(users) == 1: - line = line + ' for ' + users.keys()[0] + line = line + ' for %s' % (users.keys()[0],) else: - line = line + ' for ' + `len(users)` + ' users' + line = line + ' for %d users' % len(users) if userseen: if aheadjobs == 0: - line = line + ' (' + thisuser + ' first)' + line = line + ' (%s first)' % thisuser else: - line = line + ' (' + `(aheadbytes+1023)/1024` - line = line + ' K before ' + thisuser + ')' + line = line + ' (%d K before %s)' % ( + (aheadbytes+1023)/1024, thisuser) lines.append(line) # sts = pipe.close() if sts: - lines.append('lpq exit status ' + `sts`) + lines.append('lpq exit status %r' % (sts,)) return string.joinfields(lines, ': ') try: |