Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from tkinter import *
- import os
- root=Tk()
- root.geometry('350x100')
- root.title("Spegnimento automatico")
- root.resizable(0,0)
- def shutdown():
- sec=v.get()
- os.system('shutdown -s -t', sec)
- def shutdownFalse():
- os.system('shutdown -a')
- mLabel=Label(text="Inserisci Tempo in secondi")
- mLabel.place(x= 100, y=0)
- v=StringVar()
- mEntry=Entry(root, textvariable=v)
- mEntry.place(x= 110, y= 25)
- mButton=Button(text= 'Conferma', command= shutdown)
- mButton.place(x=90, y=50)
- mButtonFalse=Button(text= "Annulla", command= shutdownFalse)
- mButtonFalse.place(x=210, y=50)
- root.mainloop()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement