8 Dec
1998
8 Dec
'98
8:17 p.m.
On Tue, 8 Dec 1998 skip@calendar.com wrote:
def show(self, year, month=0): """return plain ASCII calendar
month == 0 ==> display calendar for entire year """
if year < 1 or year > 9999: raise ValueError, ("year out of range: %d" % year) if month < 0 or month > 12: raise ValueError, ("month out of range: %d" % month)
if month: cal = os.popen("cal %s %s" % (month, year)).read() else: cal = os.popen("cal %s" % year).read()
return HTMLFile('cal', month=month, year=year, cal=cal)
cal is a string not a file. I am not a Zope user though so I might be talking nonsense Pavlos