9 lines
303 B
Python
9 lines
303 B
Python
import os
|
|
from typing import List, Tuple
|
|
|
|
|
|
def get_logs() -> List[Tuple[int, str]]:
|
|
return [(int(os.path.basename(dir_path)), dir_path.split("/")[2].strip())
|
|
for dir_path, _, filenames in os.walk("static/logs")
|
|
if dir_path != "static/logs" and len(dir_path.split("/")) == 3]
|