HTMLCalendar generates one- and twelve-month calendars in HTML format with optional links.
Download the latest .tar.gz source release from the Python Package Index and follow the instructions in its README file.
Generate a calendar for May 2004 adding links for days 1, 2, 3, 12 and 27:
import HTMLCalendar
month = 5
year = 2004
links = {1:'#day1', 2:'#day2', 3:'#day3', 12:'#day12', 27:'#day27'}
print HTMLCalendar.MonthCal().render(year, month, links)
Result: