Ann: HTMLized calendar module

Fred Pacquier fredp at multimania.com.nospam
Thu Aug 26 12:14:53 EDT 1999


FWIW:

For a small project I did at work I needed to create web pages with 
calendars that could be modified by a python script on a regular basis 
(like adding links to month names, days, week numbers...).

I thought I would find something similar ready-made on the net, but I 
didn't. So I took the standard library module calendar.py and turned into 
html_cal.py.

There is only one new method that creates a monthly calendar like 
prmonth(), except that:

- it prints week numbers
- it returns a string instead of printing to stdio
- month names, weekdays and week numbers are tagged with "pseudo-HTML", ie 
tags that will not display until some other script has changed them to 
actual <a href=""> or such.

It's probably not the purest python code in the world (mine, I mean :) as 
I'm quite new to this, but it does the job. If it may be of use to anyone, 
just mail me (beware the .nospam :). If it's already been done better, 
please enlighten me, too.

-- 
YAFAP : http://www.multimania.com/fredp/




More information about the Python-list mailing list