summaryrefslogtreecommitdiffstats
path: root/Lib/mailcap.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/mailcap.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/mailcap.py')
-rw-r--r--Lib/mailcap.py24
1 files changed, 12 insertions, 12 deletions
diff --git a/Lib/mailcap.py b/Lib/mailcap.py
index b2ddacd..fd17f5b 100644
--- a/Lib/mailcap.py
+++ b/Lib/mailcap.py
@@ -219,37 +219,37 @@ def test():
for i in range(1, len(sys.argv), 2):
args = sys.argv[i:i+2]
if len(args) < 2:
- print "usage: mailcap [MIMEtype file] ..."
+ print("usage: mailcap [MIMEtype file] ...")
return
MIMEtype = args[0]
file = args[1]
command, e = findmatch(caps, MIMEtype, 'view', file)
if not command:
- print "No viewer found for", type
+ print("No viewer found for", type)
else:
- print "Executing:", command
+ print("Executing:", command)
sts = os.system(command)
if sts:
- print "Exit status:", sts
+ print("Exit status:", sts)
def show(caps):
- print "Mailcap files:"
- for fn in listmailcapfiles(): print "\t" + fn
- print
+ print("Mailcap files:")
+ for fn in listmailcapfiles(): print("\t" + fn)
+ print()
if not caps: caps = getcaps()
- print "Mailcap entries:"
- print
+ print("Mailcap entries:")
+ print()
ckeys = caps.keys()
ckeys.sort()
for type in ckeys:
- print type
+ print(type)
entries = caps[type]
for e in entries:
keys = e.keys()
keys.sort()
for k in keys:
- print " %-15s" % k, e[k]
- print
+ print(" %-15s" % k, e[k])
+ print()
if __name__ == '__main__':
test()