Skip to content

Commit 6d09286

Browse files
committed
initial commit
1 parent 163671b commit 6d09286

File tree

4 files changed

+34
-0
lines changed

4 files changed

+34
-0
lines changed

abort.py

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
import subprocess
2+
3+
subprocess.call(["shutdown", "-a"])

fire and magnets.py

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
import subprocess
2+
import sys
3+
yn = raw_input("shutdown computer s/r/c:")
4+
if yn.lower() == 's':
5+
subprocess.call(["shutdown", "-f", "-s", "-t", "0"])
6+
elif yn.lower() == 'r':
7+
subprocess.call(["shutdown", "-f", "-r", "-t", "0"])
8+
else:
9+
print "ok"

remote_shutdown.py

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
import subprocess
2+
import sys
3+
4+
location = input("local or remote shutdown? l/r:")
5+
if location.lower == "r":
6+
pc = input("What is the PC name?:")
7+
hours = input("In how many hours would you like to shutdown?:")
8+
mins = input("In how many minutes would you like to shutdown?:")
9+
secs = (hours * 3600) + (mins * 60)
10+
subprocess.call(["shutdown", "-f", "-s", "/m \\\\", pc, "-t", str(secs)])
11+
else:
12+
hours = input("In how many hours would you like to shutdown?:")
13+
mins = input("In how many minutes would you like to shutdown?:")
14+
secs = (hours * 3600) + (mins * 60)
15+
subprocess.call(["shutdown", "-f", "-s", "-t", str(secs)])

shutdown.py

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
import subprocess
2+
import sys
3+
4+
hours = input("In how many hours would you like to shutdown:")
5+
mins = input("In how many minutes would you like to shutdown:")
6+
secs = (hours * 3600) + (mins * 60)
7+
subprocess.call(["shutdown", "-f", "-s", "-t", str(secs)])

0 commit comments

Comments
 (0)