snippets/students.py. Goal is to compute from those names (containing umlauts) the directory names.
iterate (tuple unpacking) over the tuples in the list.
str.replace()umlauts, upper and lower.
observe code duplication.
Once transformed …
Take from the commmandline (
sys.argv) the repository root
Compute the path to each user’s supposed
First, using dumb string additions and
os.path.join()(⟶ look it up in the docs)
Check existence using
RuntimeErrorif not there
Whole program stops on first failure ⟶ collect errors and move on to next user
except, gathering errors in a list
output pass/fail once all users iterated
In the shell, run one prog. Show what “capture stdout” means, by redirecting to a file.
.../digit 7 | cat > file: aha, pipe to somewhere, and use that instead.
subprocess. Read docs.
Find that most progs are not executable. Catch that.
bytes. OMG, explain encoding. Notebook.
Raw user list
Function to convert to exercise dirs.