-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.py
54 lines (40 loc) · 1.57 KB
/
main.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
import tkinter as tk
from tkinter import *
import os
import sys
from tkinter import messagebox
class Main:
def __init__(self, root):
self.root = root
self.root.title("Python MT")
self.root.geometry("600x300")
root.iconbitmap("icon.ico")
root.resizable(False, False)
self.welcome_label = tk.Label(self.root, text="Welcome", justify="center", fg="blue", font=("Arial", 24))
self.welcome_label.place(x=230, y=40)
self.button = Button(text = 'Weather', bd = '5', command=weather)
self.button.place(x=260, y=90)
self.button = Button(text = 'File Organizer', bd = '5', command= file_org)
self.button.place(x=250, y=125)
self.button = Button(text = 'Games', bd = '5', command=games)
self.button.place(x=268, y=160)
self.button = Button(text = 'Video Downloader', bd = '5', command=video_downloader)
self.button.place(x=240, y=195)
self.button = Button(text = 'Shutdown', bd = '5', command=shutdown)
self.button.place(x=260, y=230)
def weather():
os.system('weather_app.py')
def file_org():
os.system('file_organizer.py')
def games():
os.system('games.py')
def video_downloader():
os.system('youtube_downloader.py')
def shutdown():
a=messagebox.askyesno('Warning',"Are You sure You Want To Shotdown your Pc?")
if a==True:
return os.system("shutdown /s /t 1")
if __name__ == "__main__":
roott = tk.Tk()
app = Main(roott)
roott.mainloop()