#requires python 2.5 from calendar import HTMLCalendar as Cal ## head = open('head','r') ## foot = open('foot','r') firstmonth = 1 lastmonth = 12 year = 2008 a = Cal(0) ## for month in xrange(firstmonth, lastmonth+1): ## if month < 10: ## out = open(str(year) + ' - 0' + str(month), 'w') #add a leading 0 ## else: ## out = open(str(year) + ' - ' + str(month), 'w') ## out.write(a.formatmonth(year, month, 1)) ## out.close() out = open(str(year), 'w') out.write(a.formatyearpage(year, 1, 3, 'cal.css')) out.close()