Advertisement
Guest User

main.py

a guest
Apr 26th, 2022
44
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.67 KB | None | 0 0
  1. import os
  2. from calendar import Calendar
  3.  
  4.  
  5. if __name__ == '__main__':
  6.     calendar_object = Calendar()
  7.     display = calendar_object.make_calendar()
  8.  
  9.     while True:
  10.  
  11.         print(display)
  12.         command = input("Input: ")
  13.  
  14.         if command == '.calendar':
  15.             display = calendar_object.make_calendar()
  16.         elif command == ".week":
  17.             calendar_object.next_week()
  18.             display = calendar_object.make_calendar()
  19.         elif command == ".help":
  20.             display = """
  21.                .calendar: changes display to thr calendar
  22.                          .week: proceeds to the next week
  23.  
  24.            """
  25.  
  26.         os.system('cls')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement