Exemplo n.º 1
0
def list_runs():
    onlydirs = [ d for d in os.listdir(paths.program_runs_dir()) if os.path.isdir(os.path.join(paths.program_runs_dir(), d)) ]
    mtime = lambda d: os.stat(os.path.join(paths.program_runs_dir(), d)).st_mtime
    sorted_dirs = list(sorted(onlydirs, key=mtime))
    for dir in sorted_dirs:
        print(dir)
Exemplo n.º 2
0
def __read_program_run(program_run_id):
    filepath = paths.program_runs_dir() + "/" + program_run_id + "/program_run.json"
    with open(filepath) as data_file:
        return json.load(data_file)