Skip to content

Commit aed5d61

Browse files
author
Sahil kumar
authored
created a new file
created new file with a python program to make calendar, hope it makes look more better now
1 parent 229f8d6 commit aed5d61

1 file changed

Lines changed: 18 additions & 0 deletions

File tree

python program to make calendar

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# importing tkinter
2+
from tkinter import *
3+
# importing calendar module
4+
import calendar
5+
# initializing tkinter
6+
root = Tk()
7+
# setting title of our Gui
8+
root.title("My Own Gui Calendar")
9+
# year for which we want the calendar to be shown on our Gui
10+
year = 2020
11+
# storing 2020 year calendar data inside myCal
12+
myCal = calendar.calendar(year)
13+
# showing calendar data using label widget
14+
cal_year = Label(root, text=myCal, font="Consolas 10 bold")
15+
# packing the Label widget
16+
cal_year.pack()
17+
# running the program in ready state
18+
root.mainloop()

0 commit comments

Comments
 (0)