23 lines
626 B
Python
Executable File
23 lines
626 B
Python
Executable File
#!/usr/bin/python3
|
|
|
|
import os
|
|
|
|
HWLIST = {
|
|
"HW1": ["prob1.txt", "prob2.txt", "main.cpp"],
|
|
}
|
|
|
|
username = os.getenv("USER")
|
|
|
|
print(f"Username: {username}")
|
|
print("------------------------------------")
|
|
|
|
for (hw,subproblems) in HWLIST.items():
|
|
for subproblem in subproblems:
|
|
full_path = f"/home/{username}/submit/{hw}/{subproblem}"
|
|
status = "OK" if os.path.exists(full_path) else "X file not found"
|
|
if os.path.exists(full_path) and os.stat(full_path).st_size == 0:
|
|
status = "X empty file"
|
|
print(f"{hw} {subproblem}\t: {status}")
|
|
print("------------------------------------")
|
|
|