-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgradingRunner.py
31 lines (24 loc) · 891 Bytes
/
gradingRunner.py
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
27
28
29
30
31
g = __import__("gradingScript")
import os
import platform
def runner():
isWindows = platform.system() == "Windows"
hwNum = str(raw_input("What homework number is this?"))
fileList = g.navigateAndStore("hw0" + hwNum + ".py")
counter = 0
clear = lambda : (os.system("cls") if isWindows else os.system("clear"))
for filePath in fileList:
done = False
lastName = filePath.split("/")[5]
prompt = "Do you want to grade " + lastName[:len(lastName) - 34] + "?"
donePrompt = "Are you done grading this homework?"
print lastName[:len(lastName) - 34]
if str(raw_input(prompt)) == "y":
while not done:
g.callFunctions(filePath)
if str(raw_input(donePrompt)) == "y":
done = True
clear()
counter = counter + 1
clear()
runner()