-
Notifications
You must be signed in to change notification settings - Fork 46
Expand file tree
/
Copy pathmain.py
More file actions
26 lines (19 loc) Β· 688 Bytes
/
main.py
File metadata and controls
26 lines (19 loc) Β· 688 Bytes
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
# This is a sample Python script.
# Press Maj+F10 to execute it or replace it with your code.
# Press Double Shift to search everywhere for classes, files, tool windows, actions, and settings.
def systemOffRestart():
import os
print("enter r for restart")
print("enter s for shutdown")
print("enter any key for exit")
option = input("enter your option")
if option == "r":
os.system('shutdown /r')
elif option == "s":
os.system('shutdown /s')
else:
exit()
# Press the green button in the gutter to run the script.
if __name__ == '__main__':
systemOffRestart()
# See PyCharm help at https://www.jetbrains.com/help/pycharm/