-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
In ML and vision, it is common to loop through a directory and retrieve all subdirectories. Thus, implement the following:
from glob import glob
def get_subdirs(root_path):
return glob(root_path + "/*/", recursive = True)avoids the need for the complicated import, adding the /*/ at the end of the path, and also the recursive parameter. Could also be useful to have a function that subsequently gets all files in that subdir:
def get_files(root_path):
return glob(root_path + "/*")Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels