-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathlauncher.py
More file actions
65 lines (52 loc) · 1.72 KB
/
launcher.py
File metadata and controls
65 lines (52 loc) · 1.72 KB
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
63
64
65
import tkinter as tk
import subprocess
import sys
import os
PROJEKTE = [
("🧮 Taschenrechner", "01_Taschenrechner/main.py"),
("📝 To-Do Liste", "02_Todo_Liste/main.py"),
("🔐 Passwort-Generator","03_Passwort_Generator/main.py"),
("⚖️ BMI-Rechner", "04_BMI_Rechner/main.py"),
("💱 Währungsrechner", "05_Waehrungsrechner/main.py"),
("🧠 LEK-Quiz", "06_LEK_Quiz/main.py"),
]
BASE = os.path.dirname(os.path.abspath(__file__))
def starten(pfad):
vollpfad = os.path.join(BASE, pfad)
subprocess.Popen([sys.executable, vollpfad], cwd=os.path.dirname(vollpfad))
def main():
root = tk.Tk()
root.title("Python Portfolio — Projektlauncher")
root.geometry("400x420")
root.resizable(False, False)
root.configure(bg="#1c1c2e")
tk.Label(
root, text="Python Portfolio",
font=("Arial", 20, "bold"), bg="#1c1c2e", fg="#e94560"
).pack(pady=(25, 5))
tk.Label(
root, text="Abdussamed Sancak · IT-Umschulung FIAE",
font=("Arial", 10), bg="#1c1c2e", fg="#8e8e93"
).pack(pady=(0, 20))
for name, pfad in PROJEKTE:
btn = tk.Button(
root,
text=name,
command=lambda p=pfad: starten(p),
font=("Arial", 13),
bg="#16213e", fg="white",
activebackground="#0f3460",
activeforeground="white",
relief="flat",
pady=9,
cursor="hand2",
width=28,
)
btn.pack(pady=4)
tk.Label(
root, text="Klicke auf ein Projekt um es zu starten",
font=("Arial", 9), bg="#1c1c2e", fg="#636366"
).pack(pady=(15, 0))
root.mainloop()
if __name__ == "__main__":
main()