From be19ed77ddb047e02fe94d142181062af6d99dcc Mon Sep 17 00:00:00 2001 From: Guido van Rossum Date: Fri, 9 Feb 2007 05:37:30 +0000 Subject: 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.) --- Lib/aifc.py | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) (limited to 'Lib/aifc.py') diff --git a/Lib/aifc.py b/Lib/aifc.py index e28c5c0b9f..bc82f48dc8 100644 --- a/Lib/aifc.py +++ b/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.") -- cgit v1.2.1