-
Notifications
You must be signed in to change notification settings - Fork 0
/
script.py
62 lines (46 loc) · 2.02 KB
/
script.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
55
56
57
58
59
60
61
62
import tkinter as tk
import webbrowser
def open_links(subject):
if subject == "oop":
# Open OOP link
oop_link = "https://classroom.google.com/u/0/c/NjU2NzU5Nzg1NDM0"
webbrowser.open(oop_link)
# Open YouTube in the second page
youtube_link = "https://www.youtube.com"
webbrowser.open_new_tab(youtube_link)
elif subject == "mvc":
# Open instructions for MVC
mvc_instructions = "https://youtube.com/"
webbrowser.open(mvc_instructions)
# Open Calculus PDF
calculus_pdf = "C:/Users/Lenovo/Downloads/Calculus-late-transcendental (Anton 11-e).pdf"
webbrowser.open(calculus_pdf)
# Open MVC Classroom link
mvc_classroom = "https://classroom.google.com/u/0/c/NjU3MjY5MTg4Mjc0"
webbrowser.open(mvc_classroom)
# Open YouTube
webbrowser.open_new_tab(youtube_link)
elif subject == "dld":
# Open DLD Classroom link
dld_classroom = "https://classroom.google.com/u/0/c/NjU3MjY4NDQ2NjIy"
webbrowser.open(dld_classroom)
# Open DLD PDF
dld_pdf = "C:/Users/Lenovo/Desktop/pdfs/dld_book.pdf"
webbrowser.open(dld_pdf)
# Open YouTube channel
youtube_channel = "https://www.youtube.com"
webbrowser.open_new_tab(youtube_channel)
else:
print("Invalid subject entered.")
root = tk.Tk()
root.title("Subject Links")
root.geometry("300x200")
frame = tk.Frame(root, bg="lightgrey")
frame.place(relwidth=1, relheight=1)
oop_button = tk.Button(frame, text="OOP", command=lambda: open_links("oop"), font=("Arial", 14), bg="white", width=20, height=2)
oop_button.pack(pady=10)
mvc_button = tk.Button(frame, text="MVC", command=lambda: open_links("mvc"), font=("Arial", 14), bg="white", width=20, height=2)
mvc_button.pack(pady=10)
dld_button = tk.Button(frame, text="DLD", command=lambda: open_links("dld"), font=("Arial", 14), bg="white", width=20, height=2)
dld_button.pack(pady=10)
root.mainloop()