mirror of
https://github.com/python/cpython.git
synced 2025-07-12 05:45:15 +00:00
Convert print statements to function calls in Tools/.
This commit is contained in:
parent
e5d0e8431f
commit
6afaeb757a
66 changed files with 777 additions and 779 deletions
|
@ -16,8 +16,8 @@ def main():
|
|||
raise getopt.GetoptError('not enough arguments', None)
|
||||
except getopt.GetoptError as msg:
|
||||
sys.stdout = sys.stderr
|
||||
print msg
|
||||
print 'usage: findlinksto pattern directory ...'
|
||||
print(msg)
|
||||
print('usage: findlinksto pattern directory ...')
|
||||
sys.exit(2)
|
||||
pat, dirs = args[0], args[1:]
|
||||
prog = re.compile(pat)
|
||||
|
@ -29,13 +29,13 @@ def visit(prog, dirname, names):
|
|||
names[:] = []
|
||||
return
|
||||
if os.path.ismount(dirname):
|
||||
print 'descend into', dirname
|
||||
print('descend into', dirname)
|
||||
for name in names:
|
||||
name = os.path.join(dirname, name)
|
||||
try:
|
||||
linkto = os.readlink(name)
|
||||
if prog.search(linkto) is not None:
|
||||
print name, '->', linkto
|
||||
print(name, '->', linkto)
|
||||
except os.error:
|
||||
pass
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue