from tkinter import *
from PIL import ImageTk, Image
from tkinter import filedialog
import time
import os
root2 = Tk()
root2.resizable(width=True, height=True)
scrollbar = Scrollbar(root2)
scrollbar.pack( side = RIGHT, fill = Y )
pilImage1 = Image.open(„C:/image1.jpg“)
pilImage2 = Image.open(„C:/image2.jpg“)
pilImage3 = Image.open(„C:/image.png“)
tkimage1 = ImageTk.PhotoImage(pilImage1)
tkimage2 = ImageTk.PhotoImage(pilImage2)
tkimage3 = ImageTk.PhotoImage(pilImage3)
def end():
root2.destroy()
def again1():
Label(root2, image=tkimage1, text=“Happy New Year! \nPeace in the World \n All the best for 2020! „,font=(‚Arial‘, 20, ‚bold‘, ‚italic‘),fg=“White“ ,compound=CENTER).pack()
def again2():
Label(root2, image=tkimage2, text=“I wish you health, happiness, and success!\n “ ,font=(‚Arial‘, 30, ‚bold‘, ‚italic‘),fg=“white“, compound=CENTER) .pack()
def again3():
Label(root2, image=tkimage3, text=“\n\n\n\n\n\n\nFrohes neues Jahr \n Bonne année\n С Новым Годом\n Feliz año nuevo\n Felice anno nuovo\n Buon anno\n Καλή Χρονιά\n Yeni yılınız kutlu olsun\n あけましておめでとうございます\n 새해 복 많이 받으세요!\n كل عام وأنتم بخير!\n新年快乐\n“
,font=(‚Arial‘, 20, ‚bold‘, ‚italic‘,), fg=“white“ ,
compound=CENTER).pack()
def Again():
root2.destroy()
time.sleep(1)
os.system(„test7.py 1“)
button1 = Button(root2, text=“Suprise 1″, fg=“blue“,command=again1)
button2 = Button(root2, text=“Suprise 2″, fg=“green“, command=again2)
button3 = Button(root2, text=“Suprise 3″, fg=“blue“ ,command=again3)
button4 = Button(root2, text=“Again“, command=Again)
button = Button(root2, text=“Bye“, command=end)
button1.pack(side = LEFT)
button2.pack(side = LEFT)
button3.pack(side = LEFT)
button4.pack(side = RIGHT)
root2.mainloop()