Python Tkinter GUI Script to Make a Basic Calendar Full Project For Beginners

Python Tkinter GUI Script to Make a Basic Calendar Full Project For Beginners


Welcome folks today in this blog post we will be building a python basic calendar in tkinter gui. The Full source code of application




Get Started




In order to get started you need to have python installed on your system. And then you need to install tkinter module by using the pip command


pip install tkinter


And now after this make an file and copy paste the following code



from tkinter import *
import tkinter as tk
from PIL import ImageTk, Image
import calendar
root = tk.Tk()

def show():

        m = int(month.get())
        y = int(year.get())
        output = calendar.month(y,m)


def clear():

def exit():

img = ImageTk.PhotoImage('calendar.png'))
label = Label(image=img),y=3)

m_label = Label(root,text="Month",font=('verdana','10','bold')),y=80)

month = Spinbox(root, from_= 1, to = 12,width="5"),y=80) 
y_label = Label(root,text="Year",font=('verdana','10','bold')),y=80)

year = Spinbox(root, from_= 2020, to = 3000,width="8"),y=80) 

cal = Text(root,width=33,height=8,relief=RIDGE,borderwidth=2),y=110)

show = Button(root,text="Show",font=('verdana',10,'bold'),relief=RIDGE,borderwidth=2,command=show),y=250)

clear = Button(root,text="Clear",font=('verdana',10,'bold'),relief=RIDGE,borderwidth=2,command=clear),y=250)

exit = Button(root,text="Exit",font=('verdana',10,'bold'),relief=RIDGE,borderwidth=2,command=exit),y=250)


READ  Python Tkinter GUI Progressbar Widget with Animation Indicator Full Tutorial For Beginners


And now if you execute this application by running the command as follows








Leave a Reply