1defformatmonth(self,theyear,themonth,withyear=True):2"""3 Return a formatted month as a table.4 """5v=[]6a=v.append7a('<table border="0" cellpadding="0" cellspacing="0" class="%s">'%(8self.cssclass_month))9a('\n')10a(self.formatmonthname(theyear,themonth,withyear=withyear))11a('\n')12a(self.formatweekheader())13a('\n')14forweekinself.monthdays2calendar(theyear,themonth):15a(self.formatweek(week))16a('\n')17a('</table>')18a('\n')19return''.join(v)