I am working on a calendar (this is a school assignment) The assignment is, Given a month and the day of the week that’s the first of that month entered as arugments on the command line, write a program that prints a calendar for the month. So, if I want to print Sept and it starts on Thursday, I would enter "python calendar.py 9 5" in the command line, and get a calendar that starts september on Thursday. Here's the code:
#!/usr/bin/python
import sys
import calendar
day = int(sys.argv[1])
month = int(sys.argv[2])
cal = calendar.TextCalendar(day)
print(cal.formatmonth(2018, month)
The error I get is File "calendar.py", line 4, in < module> import calendar
File "/home/myname/calendar.py", line 5, in < module> import TextCalendar
ImportError: No module named TextCalendar
Can someone tell me how to correct this? Thanks for any help!