[Tutor] Cal command in python...

Asrarahmed Kadri ajkadri at googlemail.com
Thu Nov 2 13:43:05 CET 2006


I got the command and saw its output..? But where to look for the source
code..?
Which library ?

TIA.

Regards,
Asrarahmed



On 11/2/06, Kent Johnson <kent37 at tds.net> wrote:
>
> Asrarahmed Kadri wrote:
> >
> >
> > Folks,
> >
> > Does anybody have an idea of the logic used in cal command... I want to
> > know the algorithm so that I can implement in Python.
>
> See the calendar module. Source code in the library if you want to see
> how it is done.
>
> In [1]: import calendar
>
> In [2]: calendar.prmonth(2006, 10)
>     October 2006
> Mo Tu We Th Fr Sa Su
>                    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
>
> Kent
>
>


-- 
To HIM you shall return.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/tutor/attachments/20061102/d6b6f1c6/attachment.htm 


More information about the Tutor mailing list