Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #39020

Re: Calendar module question

Date 2013-02-17 18:45 +1000
From Phil <phil_lor@bigpond.com>
Subject Re: Calendar module question
References <51208B03.2070404@bigpond.com> <51208E47.6050000@gmail.com>
Newsgroups comp.lang.python
Message-ID <mailman.1886.1361090720.2939.python-list@python.org> (permalink)

Show all headers | View raw


On 17/02/13 18:01, Andrew Berg wrote:
> On 2013.02.17 01:47, Phil wrote:
>> Why would this code work under the Wing IDE and nowhere else? Could
>> there be a different calendar module included with Wing?
>>
>> import calendar
>>
>> cal = calendar.prcal(2013)
>> print cal
>>
>> Traceback (most recent call last):
>>     File "calendar.py", line 1, in <module>
>>       import calendar
>>     File "/home/phil/calendar.py", line 3, in <module>
>>       cal = calendar.prcal(2013)
>> AttributeError: 'module' object has no attribute 'prcal'
>>
>
> If you look at the traceback, you'll see you have a calendar.py in your
> home directory that is being imported instead of the one from the stdlib.
>

Thank you for your quick response Andrew. Of course, I now have another 
question; how do I use the correct calendar module? The Wing IDE 
apparently uses the correct module.

-- 
Regards,
Phil

Back to comp.lang.python | Previous | Next | Find similar | Unroll thread


Thread

Re: Calendar module question Phil <phil_lor@bigpond.com> - 2013-02-17 18:45 +1000

csiph-web