summaryrefslogtreecommitdiffstats
path: root/Lib/rfc822.py
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>2007-02-09 05:37:30 (GMT)
committerGuido van Rossum <guido@python.org>2007-02-09 05:37:30 (GMT)
commitbe19ed77ddb047e02fe94d142181062af6d99dcc (patch)
tree70f214e06554046fcccbadeb78665f25e07ce965 /Lib/rfc822.py
parent452bf519a70c3db0e7f0d2540b1bfb07d9085583 (diff)
downloadcpython-be19ed77ddb047e02fe94d142181062af6d99dcc.zip
cpython-be19ed77ddb047e02fe94d142181062af6d99dcc.tar.gz
cpython-be19ed77ddb047e02fe94d142181062af6d99dcc.tar.bz2
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.)
Diffstat (limited to 'Lib/rfc822.py')
-rw-r--r--Lib/rfc822.py32
1 files changed, 16 insertions, 16 deletions
diff --git a/Lib/rfc822.py b/Lib/rfc822.py
index a9109cd..8c636c1 100644
--- a/Lib/rfc822.py
+++ b/Lib/rfc822.py
@@ -972,32 +972,32 @@ if __name__ == '__main__':
if sys.argv[1:]: file = sys.argv[1]
f = open(file, 'r')
m = Message(f)
- print 'From:', m.getaddr('from')
- print 'To:', m.getaddrlist('to')
- print 'Subject:', m.getheader('subject')
- print 'Date:', m.getheader('date')
+ print('From:', m.getaddr('from'))
+ print('To:', m.getaddrlist('to'))
+ print('Subject:', m.getheader('subject'))
+ print('Date:', m.getheader('date'))
date = m.getdate_tz('date')
tz = date[-1]
date = time.localtime(mktime_tz(date))
if date:
- print 'ParsedDate:', time.asctime(date),
+ print('ParsedDate:', time.asctime(date), end=' ')
hhmmss = tz
hhmm, ss = divmod(hhmmss, 60)
hh, mm = divmod(hhmm, 60)
- print "%+03d%02d" % (hh, mm),
- if ss: print ".%02d" % ss,
- print
+ print("%+03d%02d" % (hh, mm), end=' ')
+ if ss: print(".%02d" % ss, end=' ')
+ print()
else:
- print 'ParsedDate:', None
+ print('ParsedDate:', None)
m.rewindbody()
n = 0
while f.readline():
n += 1
- print 'Lines:', n
- print '-'*70
- print 'len =', len(m)
- if 'Date' in m: print 'Date =', m['Date']
+ print('Lines:', n)
+ print('-'*70)
+ print('len =', len(m))
+ if 'Date' in m: print('Date =', m['Date'])
if 'X-Nonsense' in m: pass
- print 'keys =', m.keys()
- print 'values =', m.values()
- print 'items =', m.items()
+ print('keys =', m.keys())
+ print('values =', m.values())
+ print('items =', m.items())