3 """List grading that still needs to be done.
7 import os.path as _os_path
10 def mtime(path, walk_directories=True):
11 if walk_directories and _os.path.isdir(path):
12 time = mtime(path, walk_directories=False)
13 for dirpath,dirnames,filenames in _os.walk(path):
14 for filename in filenames:
15 t = mtime(_os_path.join(dirpath, filename))
22 """Return ``True`` if ``a`` is newer than ``b``.
24 return mtime(a) > mtime(b)
26 def todo(basedir, source, target):
27 """Yield ``source``\s in ``basedir`` with old/missing ``target``\s.
29 for dirpath,dirnames,filenames in _os.walk(basedir):
30 names = dirnames + filenames
32 s = _os_path.join(dirpath, source)
33 t = _os_path.join(dirpath, target)
40 def print_todo(basedir, source, target):
41 """Print ``source``\s in ``basedir`` with old/missing ``target``\s.
43 for path in sorted(todo(basedir, source, target)):