mirror of
https://github.com/python/cpython.git
synced 2025-08-31 22:18:28 +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
30
Lib/aifc.py
30
Lib/aifc.py
|
@ -453,7 +453,7 @@ class Aifc_read:
|
|||
kludge = 0
|
||||
if chunk.chunksize == 18:
|
||||
kludge = 1
|
||||
print 'Warning: bad COMM chunk size'
|
||||
print('Warning: bad COMM chunk size')
|
||||
chunk.chunksize = 23
|
||||
#DEBUG end
|
||||
self._comptype = chunk.read(4)
|
||||
|
@ -518,11 +518,11 @@ class Aifc_read:
|
|||
# a position 0 and name ''
|
||||
self._markers.append((id, pos, name))
|
||||
except EOFError:
|
||||
print 'Warning: MARK chunk contains only',
|
||||
print len(self._markers),
|
||||
if len(self._markers) == 1: print 'marker',
|
||||
else: print 'markers',
|
||||
print 'instead of', nmarkers
|
||||
print('Warning: MARK chunk contains only', end=' ')
|
||||
print(len(self._markers), end=' ')
|
||||
if len(self._markers) == 1: print('marker', end=' ')
|
||||
else: print('markers', end=' ')
|
||||
print('instead of', nmarkers)
|
||||
|
||||
class Aifc_write:
|
||||
# Variables used in this class:
|
||||
|
@ -939,16 +939,16 @@ if __name__ == '__main__':
|
|||
sys.argv.append('/usr/demos/data/audio/bach.aiff')
|
||||
fn = sys.argv[1]
|
||||
f = open(fn, 'r')
|
||||
print "Reading", fn
|
||||
print "nchannels =", f.getnchannels()
|
||||
print "nframes =", f.getnframes()
|
||||
print "sampwidth =", f.getsampwidth()
|
||||
print "framerate =", f.getframerate()
|
||||
print "comptype =", f.getcomptype()
|
||||
print "compname =", f.getcompname()
|
||||
print("Reading", fn)
|
||||
print("nchannels =", f.getnchannels())
|
||||
print("nframes =", f.getnframes())
|
||||
print("sampwidth =", f.getsampwidth())
|
||||
print("framerate =", f.getframerate())
|
||||
print("comptype =", f.getcomptype())
|
||||
print("compname =", f.getcompname())
|
||||
if sys.argv[2:]:
|
||||
gn = sys.argv[2]
|
||||
print "Writing", gn
|
||||
print("Writing", gn)
|
||||
g = open(gn, 'w')
|
||||
g.setparams(f.getparams())
|
||||
while 1:
|
||||
|
@ -958,4 +958,4 @@ if __name__ == '__main__':
|
|||
g.writeframes(data)
|
||||
g.close()
|
||||
f.close()
|
||||
print "Done."
|
||||
print("Done.")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue