summaryrefslogtreecommitdiff
path: root/Lib/calendar.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/calendar.py')
-rw-r--r--Lib/calendar.py14
1 files changed, 7 insertions, 7 deletions
diff --git a/Lib/calendar.py b/Lib/calendar.py
index 00948efe5c..149c7adadb 100644
--- a/Lib/calendar.py
+++ b/Lib/calendar.py
@@ -261,7 +261,7 @@ class TextCalendar(Calendar):
"""
Print a single week (no newline).
"""
- print self.week(theweek, width),
+ print(self.week(theweek, width), end=' ')
def formatday(self, day, weekday, width):
"""
@@ -308,7 +308,7 @@ class TextCalendar(Calendar):
"""
Print a month's calendar.
"""
- print self.formatmonth(theyear, themonth, w, l),
+ print(self.formatmonth(theyear, themonth, w, l), end=' ')
def formatmonth(self, theyear, themonth, w=0, l=0):
"""
@@ -365,7 +365,7 @@ class TextCalendar(Calendar):
def pryear(self, theyear, w=0, l=0, c=6, m=3):
"""Print a year's calendar."""
- print self.formatyear(theyear, w, l, c, m)
+ print(self.formatyear(theyear, w, l, c, m))
class HTMLCalendar(Calendar):
@@ -584,7 +584,7 @@ _spacing = 6 # Number of spaces between columns
def format(cols, colwidth=_colwidth, spacing=_spacing):
"""Prints multi-column formatting for year calendars"""
- print formatstring(cols, colwidth, spacing)
+ print(formatstring(cols, colwidth, spacing))
def formatstring(cols, colwidth=_colwidth, spacing=_spacing):
@@ -668,9 +668,9 @@ def main(args):
encoding = sys.getdefaultencoding()
optdict = dict(encoding=encoding, css=options.css)
if len(args) == 1:
- print cal.formatyearpage(datetime.date.today().year, **optdict)
+ print(cal.formatyearpage(datetime.date.today().year, **optdict))
elif len(args) == 2:
- print cal.formatyearpage(int(args[1]), **optdict)
+ print(cal.formatyearpage(int(args[1]), **optdict))
else:
parser.error("incorrect number of arguments")
sys.exit(1)
@@ -694,7 +694,7 @@ def main(args):
sys.exit(1)
if options.encoding:
result = result.encode(options.encoding)
- print result
+ print(result)
if __name__ == "__main__":