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


Groups > comp.lang.python > #39017 > unrolled thread

Re: Calendar module question

Started byAndrew Berg <bahamutzero8825@gmail.com>
First post2013-02-17 02:01 -0600
Last post2013-02-17 02:01 -0600
Articles 1 — 1 participant

Back to article view | Back to comp.lang.python

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: Calendar module question Andrew Berg <bahamutzero8825@gmail.com> - 2013-02-17 02:01 -0600

#39017 — Re: Calendar module question

FromAndrew Berg <bahamutzero8825@gmail.com>
Date2013-02-17 02:01 -0600
SubjectRe: Calendar module question
Message-ID<mailman.1884.1361089729.2939.python-list@python.org>
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.
-- 
CPython 3.3.0 | Windows NT 6.2.9200.16496 / FreeBSD 9.1-RELEASE

[toc] | [standalone]


Back to top | Article view | comp.lang.python


csiph-web