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 <[EMAIL PROTECTED]> 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.
_______________________________________________
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor

Reply via email to