mirror of
https://github.com/python/cpython.git
synced 2025-10-17 12:18:23 +00:00
Fix most trivially-findable print statements.
There's one major and one minor category still unfixed: doctests are the major category (and I hope to be able to augment the refactoring tool to refactor bona fide doctests soon); other code generating print statements in strings is the minor category. (Oh, and I don't know if the compiler package works.)
This commit is contained in:
parent
452bf519a7
commit
be19ed77dd
331 changed files with 2567 additions and 2648 deletions
|
@ -37,7 +37,7 @@ class ArgvCollector:
|
|||
self._dooneevent(mask, timeout)
|
||||
|
||||
if not self.quitting:
|
||||
print "argvemulator: timeout waiting for arguments"
|
||||
print("argvemulator: timeout waiting for arguments")
|
||||
|
||||
self.close()
|
||||
|
||||
|
@ -54,12 +54,12 @@ class ArgvCollector:
|
|||
AE.AEProcessAppleEvent(event)
|
||||
except AE.Error as err:
|
||||
msg = "High Level Event: %r %r" % (hex(message), hex(h | (v<<16)))
|
||||
print 'AE error: ', err
|
||||
print 'in', msg
|
||||
print('AE error: ', err)
|
||||
print('in', msg)
|
||||
traceback.print_exc()
|
||||
return
|
||||
else:
|
||||
print "Unhandled event:", event
|
||||
print("Unhandled event:", event)
|
||||
|
||||
|
||||
def _quit(self):
|
||||
|
@ -78,7 +78,7 @@ class ArgvCollector:
|
|||
pathname = fsref.as_pathname()
|
||||
sys.argv.append(pathname)
|
||||
except Exception as e:
|
||||
print "argvemulator.py warning: can't unpack an open document event"
|
||||
print("argvemulator.py warning: can't unpack an open document event")
|
||||
import traceback
|
||||
traceback.print_exc()
|
||||
|
||||
|
@ -86,4 +86,4 @@ class ArgvCollector:
|
|||
|
||||
if __name__ == '__main__':
|
||||
ArgvCollector().mainloop()
|
||||
print "sys.argv=", sys.argv
|
||||
print("sys.argv=", sys.argv)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue