title: python calendar.HTMLCalendar
body: <p>I think I want to use pythons built in calendar module to create an HTML calendar with data.  I say I think because I'll probably think of a better way, but right now it's a little personal.  I don't know if this was intended to be used this way but it seems like it is a little pointless if you can't at least making the days into a <code>&lt;a hrefs&gt;</code>.</p>
  
  <p>This sets up a calendar for this month with Sunday as the first day.</p>
  
  <pre><code>import calendar
  myCal = calendar.HTMLCalendar(calendar.SUNDAY)
  print myCal.formatmonth(2009, 7)
  </code></pre>
  
  <p>it prints</p>
  
  <pre><code>&lt;table border="0" cellpadding="0" cellspacing="0" class="month"&gt;\n&lt;tr&gt;
  &lt;th colspan="7" class="month"&gt;July 2009&lt;/th&gt;&lt;/tr&gt;\n&lt;tr&gt;&lt;th class="sun"&gt;Sun&lt;/th&gt;
  &lt;th class="mon"&gt;Mon&lt;/th&gt;&lt;th class="tue"&gt;Tue&lt;/th&gt;&lt;th class="wed"&gt;Wed&lt;/th&gt;
  &lt;th class="thu"&gt;Thu&lt;/th&gt;&lt;th class="fri"&gt;Fri&lt;/th&gt;&lt;th class="sat"&gt;Sat&lt;/th&gt;&lt;/tr&gt;\n
  &lt;tr&gt;&lt;td class="noday"&gt;&amp;nbsp;&lt;/td&gt;&lt;td class="noday"&gt;&amp;nbsp;&lt;/td&gt;
  &lt;td class="noday"&gt;&amp;nbsp;&lt;/td&gt;&lt;td class="wed"&gt;1&lt;/td&gt;&lt;td class="thu"&gt;2&lt;/td&gt;&lt;td class="fri"&gt;3&lt;/td&gt;
  &lt;td class="sat"&gt;4&lt;/td&gt;&lt;/tr&gt;\n&lt;tr&gt;&lt;td class="sun"&gt;5&lt;/td&gt;&lt;td class="mon"&gt;6&lt;/td&gt;&lt;td class="tue"&gt;7&lt;/td&gt;
  &lt;td class="wed"&gt;8&lt;/td&gt;&lt;td class="thu"&gt;9&lt;/td&gt;&lt;td class="fri"&gt;10&lt;/td&gt;
  &lt;td class="sat"&gt;11&lt;/td&gt;&lt;/tr&gt;\n&lt;tr&gt;&lt;td class="sun"&gt;12&lt;/td&gt;&lt;td class="mon"&gt;13&lt;/td&gt;
  &lt;td class="tue"&gt;14&lt;/td&gt;&lt;td class="wed"&gt;15&lt;/td&gt;&lt;td class="thu"&gt;16&lt;/td&gt;&lt;td class="fri"&gt;17&lt;/td&gt;
  &lt;td class="sat"&gt;18&lt;/td&gt;&lt;/tr&gt;\n&lt;tr&gt;&lt;td class="sun"&gt;19&lt;/td&gt;&lt;td class="mon"&gt;20&lt;/td&gt;
  &lt;td class="tue"&gt;21&lt;/td&gt;&lt;td class="wed"&gt;22&lt;/td&gt;&lt;td class="thu"&gt;23&lt;/td&gt;&lt;td class="fri"&gt;24&lt;/td&gt;
  &lt;td class="sat"&gt;25&lt;/td&gt;&lt;/tr&gt;\n&lt;tr&gt;&lt;td class="sun"&gt;26&lt;/td&gt;&lt;td class="mon"&gt;27&lt;/td&gt;
  &lt;td class="tue"&gt;28&lt;/td&gt;&lt;td class="wed"&gt;29&lt;/td&gt;&lt;td class="thu"&gt;30&lt;/td&gt;&lt;td class="fri"&gt;31&lt;/td&gt;
  &lt;td class="noday"&gt;&amp;nbsp;&lt;/td&gt;&lt;/tr&gt;\n&lt;/table&gt;\n
  </code></pre>
  
  <p>I would like to insert some data into the HTMLCalendar object before it renders the html string.  I just can't figure out how.  </p>
  
  <p>For example</p>
  
  <pre><code>&lt;td class="tue"&gt;28&lt;br /&gt;[my data]&lt;/td&gt;
  </code></pre>