- Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathargparse.py
More file actions
Latest commit
21 lines (16 loc) · 491 Bytes
/
Copy pathargparse.py
File metadata and controls
21 lines (16 loc) · 491 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
importos
importargparse
defsearch_folder(folder_name):
search_results= []
forpath, dirs, filesinos.walk('/home/spartan/Downloads/test/'):
iffolder_nameindirs:
search_results.append(path)
returnsearch_results
if__name__=='__main__':
f_name='hidden'
result=search_folder(f_name)
iflen(result) !=0:
forpathinresult:
print(f'Folder {f_name} found at {path}')
else:
print('Folder not found')