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/mkrcs.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/mkrcs.py')
-rwxr-xr-x | Demo/scripts/mkrcs.py | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/Demo/scripts/mkrcs.py b/Demo/scripts/mkrcs.py index 36a35ea..917b4fe 100755 --- a/Demo/scripts/mkrcs.py +++ b/Demo/scripts/mkrcs.py @@ -12,13 +12,13 @@ def main(): rcstree = 'RCStree' rcs = 'RCS' if os.path.islink(rcs): - print `rcs`, 'is a symlink to', `os.readlink(rcs)` + print '%r is a symlink to %r' % (rcs, os.readlink(rcs)) return if os.path.isdir(rcs): - print `rcs`, 'is an ordinary directory' + print '%r is an ordinary directory' % (rcs,) return if os.path.exists(rcs): - print `rcs`, 'is a file?!?!' + print '%r is a file?!?!' % (rcs,) return # p = os.getcwd() @@ -29,26 +29,26 @@ def main(): # (2) up is the same directory as p # Ergo: # (3) join(up, down) is the current directory - #print 'p =', `p` + #print 'p =', repr(p) while not os.path.isdir(os.path.join(p, rcstree)): head, tail = os.path.split(p) - #print 'head =', `head`, '; tail =', `tail` + #print 'head = %r; tail = %r' % (head, tail) if not tail: - print 'Sorry, no ancestor dir contains', `rcstree` + print 'Sorry, no ancestor dir contains %r' % (rcstree,) return p = head up = os.path.join(os.pardir, up) down = os.path.join(tail, down) - #print 'p =', `p`, '; up =', `up`, '; down =', `down` + #print 'p = %r; up = %r; down = %r' % (p, up, down) there = os.path.join(up, rcstree) there = os.path.join(there, down) there = os.path.join(there, rcs) if os.path.isdir(there): - print `there`, 'already exists' + print '%r already exists' % (there, ) else: - print 'making', `there` + print 'making %r' % (there,) makedirs(there) - print 'making symlink', `rcs`, '->', `there` + print 'making symlink %r -> %r' % (rcs, there) os.symlink(there, rcs) def makedirs(p): |