calendar modules
Lemniscate
d_blade8 at hotmail.com
Wed Nov 13 14:36:11 EST 2002
Absolutely correct. However, you can save a teensy bit of typing by
using prmonth instead. For example:
>>> calendar.prmonth(1976, 10)
October 1976
Su Mo Tu We Th Fr Sa
1 2
3 4 5 6 7 8 9
10 11 12 13 14 15 16
17 18 19 20 21 22 23
24 25 26 27 28 29 30
31
>>>
btw, I set the deafult first weekday to Sunday.
>>> calendar.setfirstweekday(6)
Have fun,
Lem
Gerhard Häring <gerhard.haering at opus-gmbh.net> wrote in message news:<slrnat4sfj.19g.gerhard.haering at haering.opus-gmbh.net>...
> In article <Pine.GSO.4.05.10211132330540.12310-100000 at sparc41.ee.cuhk.edu.hk>, Geiger Ho wrote:
> > Hi all,
> >
> > Wondering around the modules, I find that "calendar" does not function
> > well in MS Windows. When I type "calendar.month(2002,11)", it outputs a
> > string
> >
> > ' November 2002\nMo Tu We Th Fr Sa Su\n 1 2 3\n 4 5 6
> > 7 8 9 10\n11 12 13 14 15 16 17\n18 19 20 21 22 23 24\n25 26 27 28 29
> > 30\n'
> >
> > but rather in proper formating.
>
> Try "print calendar.month(2002, 11)" instead of the implicit repr that's called
> in your case.
>
> > This seems calendar module is not platform
>
> It is.
More information about the Python-list
mailing list