Calendar Stuff

Victor Subervi victorsubervi at gmail.com
Wed Nov 11 08:23:48 EST 2009


On Wed, Nov 11, 2009 at 1:12 AM, Simon Forman <sajmikins at gmail.com> wrote:

> On Tue, Nov 10, 2009 at 12:53 PM, Victor Subervi
> <victorsubervi at gmail.com> wrote:
> > Hi;
> > I have the following code:
> >
> > import calendar, datetime
> >
> > def cal():
> >   ...
> >   myCal = calendar.Calendar(calendar.SUNDAY)
> >   today = datetime.date.today()
> >   day = today.day
> >   mo = today.month
> >   yr = today.year
> > #  month = myCal.monthdayscalendar(int(time.strftime("%Y"))
> >   month = myCal.monthdayscalendar(yr, mo)
> >   print 'hi'
> >
> > html headers are included. No matter which one of the last two lines I
> > comment out, I never get to the point of printing 'hi'. (If I comment
> them
> > both out, it does print.) What do?
> > TIA,
> > Victor
>
> Have you tried walking through the code line-by-line in the
> interactive interpreter?
>

Yes. It works just fine in the interactive interpreter, darn it.

>
> That should give you an idea of why those lines aren't working.  Also,
> if your code never prints 'hi', what does it do instead?  Hang? Or
> give you a traceback?
>

Hangs. I'd love a traceback!
V

> --
> http://mail.python.org/mailman/listinfo/python-list
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20091111/2d209896/attachment-0001.html>


More information about the Python-list mailing list