WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 06-02-2010, 05:03 PM
nige777 nige777 is offline
Member
 
Join Date: Nov 2007
Location: UK
Posts: 78
Unhappy re: Calendar

Quick question about the standard python calendar module - seems it works great in the interactive input window, but when using it in a script - whatever function of calendar I try to use throws a
Code:
Traceback (most recent call last):
  File "<string>", line 11, in ?
  File "calendar.py", line 2, in ?
    import calendar
  File "calendar.py", line 5, in ?
    print calendar.month(2010,6)
AttributeError: 'module' object has no attribute 'month'
- type of error - however confusingly (for me ) month, and its attributes was suggested by vizard & this exact same line will be happily accepted through the interactive window and prints out a calendar for June 2010? Am I missing something really silly here??
My code is VERY simple -
Code:
import viz
import calendar
viz.go()

print calendar.month(2010,6)
Any help would be appreciated
Reply With Quote
  #2  
Old 06-02-2010, 05:08 PM
farshizzo farshizzo is offline
WorldViz Team Member
 
Join Date: Mar 2003
Posts: 2,849
You probably created a file called calendar.py in your script directory, which is overriding the built-in calendar module. Rename the file and it should work.
Reply With Quote
  #3  
Old 06-03-2010, 03:13 AM
nige777 nige777 is offline
Member
 
Join Date: Nov 2007
Location: UK
Posts: 78
Red face re:

Ha ha, I knew it would be something really silly - working late at night again!!

Thanks farshi
Reply With Quote
Reply

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 09:42 AM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2022, vBulletin Solutions, Inc.
Copyright 2002-2018 WorldViz LLC