From f51f4c599d7a4d366b0696251f0f8519f361608f Mon Sep 17 00:00:00 2001 From: archnotwindows <108471111+archnotwindows@users.noreply.github.com> Date: Mon, 4 Jul 2022 17:48:32 +0200 Subject: [PATCH] Add files via upload --- index.py | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 index.py diff --git a/index.py b/index.py new file mode 100644 index 0000000..9d61b3b --- /dev/null +++ b/index.py @@ -0,0 +1,42 @@ + + +from cgitb import text +import tkinter as tk +import subprocess + + + + +window = tk.Tk() +window.geometry("800x500") +window.title("poweroffer") + +window.configure(background="blue") + + +window.grid_columnconfigure(0, weight=1) + +scritta = tk.Label(window, text="Benvenuto nel mio programma!", font=("Helvetica",15)) +scritta.grid(row=0, column=0, sticky="N", padx=20, pady=10) + +text_input= tk.Entry() +text_input.grid(row=3, column=0, sticky="WE", padx=10, pady=10) + + +def spegni(): + subprocess.run('shutdown now', shell=True) + + + + +first_button = tk.Button(text="Staccati un po' dal pc", command=spegni) + + +first_button.grid(row=1, column=0, sticky="W", padx=50, pady=50) + + + + + +if __name__ == "__main__": + window.mainloop()