[Tutor] Error while using calendar module in Python 2.7

Steven D'Aprano steve at pearwood.info
Sat Mar 5 10:49:44 CET 2011

Alan Gauld wrote:
> "ranjan das" <ranjand2005 at gmail.com> wrote

>> Error:
>> Traceback (most recent call last):
>>  File "C:\Python27\Foursoft\calendar.py", line 33, in <module>
>>    while friday.weekday() != calendar.FRIDAY:
>> AttributeError: 'module' object has no attribute 'FRIDAY'
> The obvious solution is that calendar has changed between 2.6 and 2.7
> but looking on v3.1(I don;t have 2.7 installed) it looks the same there.
> Certainly the day constants are still there.

What's "Foursoft"?

I would say that the standard library calendar module is being shadowed 
by another module with the same name.


More information about the Tutor mailing list