Re: Calendar module question

Discussion in 'Python' started by Phil, Feb 17, 2013.

  1. Phil

    Phil Guest

    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
    Phil, Feb 17, 2013
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Shevek
    Replies:
    3
    Views:
    6,004
    Shevek
    Jun 23, 2004
  2. Shevek
    Replies:
    0
    Views:
    370
    Shevek
    Jun 23, 2004
  3. Parthiv Joshi
    Replies:
    1
    Views:
    632
    Samuel L Matzen
    Jul 6, 2004
  4. Phil

    Calendar module question

    Phil, Feb 17, 2013, in forum: Python
    Replies:
    0
    Views:
    86
  5. Andrew Berg

    Re: Calendar module question

    Andrew Berg, Feb 17, 2013, in forum: Python
    Replies:
    0
    Views:
    90
    Andrew Berg
    Feb 17, 2013
Loading...

Share This Page