Add files via upload

This commit is contained in:
archnotwindows 2022-07-04 17:48:32 +02:00 committed by GitHub
parent 0ecd7f0590
commit f51f4c599d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 42 additions and 0 deletions

42
index.py Normal file
View File

@ -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()