'Return a month\'s calendar string (multi-line).'

def formatmonth(self, theyear, themonth, w=0, l=0):

    w = max(2, w)
    l = max(1, l)
    s = self.formatmonthname(theyear, themonth, ((7 * (w + 1)) - 1))
    s = s.rstrip()
    s += ('\n' * l)
    s += self.formatweekheader(w).rstrip()
    s += ('\n' * l)
    for week in self.monthdays2calendar(theyear, themonth):
        s += self.formatweek(week, w).rstrip()
        s += ('\n' * l)
    return s
