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/StringIO.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'Lib/StringIO.py') diff --git a/Lib/StringIO.py b/Lib/StringIO.py index 9394360fa7..a6b0ea4061 100644 --- a/Lib/StringIO.py +++ b/Lib/StringIO.py @@ -291,14 +291,14 @@ def test(): if f.getvalue() != text: raise RuntimeError, 'write failed' length = f.tell() - print 'File length =', length + print('File length =', length) f.seek(len(lines[0])) f.write(lines[1]) f.seek(0) - print 'First line =', repr(f.readline()) - print 'Position =', f.tell() + print('First line =', repr(f.readline())) + print('Position =', f.tell()) line = f.readline() - print 'Second line =', repr(line) + print('Second line =', repr(line)) f.seek(-len(line), 1) line2 = f.read(len(line)) if line != line2: @@ -310,13 +310,13 @@ def test(): line2 = f.read() if line != line2: raise RuntimeError, 'bad result after seek back from EOF' - print 'Read', len(list), 'more lines' - print 'File length =', f.tell() + print('Read', len(list), 'more lines') + print('File length =', f.tell()) if f.tell() != length: raise RuntimeError, 'bad length' f.truncate(length/2) f.seek(0, 2) - print 'Truncated length =', f.tell() + print('Truncated length =', f.tell()) if f.tell() != length/2: raise RuntimeError, 'truncate did not adjust length' f.close() -- cgit v1.2.1