Python Everywhere
Shutdown, Restart, Logout System Using Python GUI: We Can Shutdown, Restart, Logout A computer Using Python GUI. Python with tkinter is the fastest and easiest way to create the GUI applications. Creating a GUI using tkinter is an easy task. Step-1: importing modules from tkinter import * import os Step-2: User Define Functions for execute Shutdown, Restart, Logout def shutdown(): return os. system("shutdown -s -t 1") def restart(): return os. system("shutdown -r -t 1") def logout(): return os. system("shutdown -l") Step-3: Create tkinter Object and setup geometry master=Tk() master. geometry("200x200") Step-4: Setting Background to grey master.c onfigure(bg='light gr...
Comments
Post a Comment