Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!news.mixmin.net!news2.arglkargh.de!nuzba.szn.dk!pnx.dk!news.stack.nl!newsfeed.xs4all.nl!newsfeed2.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.023 X-Spam-Evidence: '*H*': 0.95; '*S*': 0.00; 'attribute': 0.05; 'subject:question': 0.08; 'ide': 0.09; 'imported': 0.09; 'subject:module': 0.09; 'calendar': 0.16; 'module?': 0.16; 'stdlib.': 0.16; 'wing': 0.16; 'wrote:': 0.17; 'module': 0.19; 'import': 0.21; 'header:In-Reply-To:1': 0.25; 'header:User- Agent:1': 0.26; 'skip:" 20': 0.26; '(most': 0.27; 'andrew': 0.27; 'module.': 0.27; 'correct': 0.28; 'received:10.0.0': 0.28; 'included': 0.29; 'code': 0.31; 'file': 0.32; 'could': 0.32; 'print': 0.32; 'traceback': 0.33; 'received:10.0': 0.33; 'to:addr :python-list': 0.33; 'another': 0.33; 'there': 0.35; 'thank': 0.36; 'uses': 0.37; 'being': 0.37; 'why': 0.37; 'subject:: ': 0.38; 'object': 0.38; 'received:10': 0.38; 'instead': 0.39; 'to:addr:python.org': 0.39; 'skip:" 10': 0.40; 'your': 0.60; "you'll": 0.62; 'different': 0.63; 'home': 0.66; 'received:61': 0.75; 'andrew.': 0.84; 'phil': 0.91 X-Authentication-Info: Submitted using ID phil_lor@bigpond.com X-Authority-Analysis: v=2.0 cv=FNSZNpUs c=1 sm=1 a=F4EmiCWD0tqd/gkRKRISIQ==:17 a=pTzqZbqM9tkA:10 a=JDadKst33uMA:10 a=8nJEP1OIZ-IA:10 a=1IlZJK9HAAAA:8 a=e3s2Ddvnt5EA:10 a=JwolVUoaK8htzZUzUsEA:9 a=wPNLvfGTeEIA:10 a=F4EmiCWD0tqd/gkRKRISIQ==:117 Date: Sun, 17 Feb 2013 18:45:08 +1000 From: Phil User-Agent: Mozilla/5.0 (X11; Linux i686; rv:17.0) Gecko/20130106 Thunderbird/17.0.2 MIME-Version: 1.0 To: python-list@python.org Subject: Re: Calendar module question References: <51208B03.2070404@bigpond.com> <51208E47.6050000@gmail.com> In-Reply-To: <51208E47.6050000@gmail.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 29 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1361090720 news.xs4all.nl 6892 [2001:888:2000:d::a6]:45770 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:39020 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 >> import calendar >> File "/home/phil/calendar.py", line 3, in >> 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